package templates

import (
	"portfolio-tracker/internal/model"
	"portfolio-tracker/internal/web/templates/components"
)

templ DashboardContent(username string) {
	<div class="container-xl mt-4">
		<div class="card">
			<div class="card-header">
				<h3 class="card-title">Willkommen, { username }!</h3>
				<p class="card-text">Hier ist dein Dashboard.</p>
			</div>
			<div class="card-body">
				<div id="chart"></div>
				<p class="text-muted">Hier können Sie Ihre Portfolio-Übersicht einsehen.</p>
			</div>
		</div>
	</div>
}

templ Result(authenticated bool, username string, portfolios []model.Portfolio) {
	@components.PageLayout(authenticated, username, "Dashboard", DashboardContent(username), portfolios)
}
