@page "/services"
@using PlanTempus.Application.Features.Services.Components
@model PlanTempus.Application.Features.Services.Pages.IndexModel
@{
    ViewData["Title"] = "Services";
}

<!-- List View (default) -->
<swp-services-list-view id="services-list-view">
    <swp-sticky-header>
        <swp-header-content>
            <swp-page-header>
                <swp-page-title>
                    <h1 localize="services.title">Services</h1>
                    <p localize="services.subtitle">Administrer services og priser</p>
                </swp-page-title>
            </swp-page-header>

            <swp-stats-row>
                @await Component.InvokeAsync("ServiceStatCard", "total-services")
                @await Component.InvokeAsync("ServiceStatCard", "active-categories")
                @await Component.InvokeAsync("ServiceStatCard", "average-price")
            </swp-stats-row>
        </swp-header-content>
    </swp-sticky-header>

    <swp-page-container>
        @await Component.InvokeAsync("ServiceTable", "all-services")
    </swp-page-container>
</swp-services-list-view>

<!-- Detail View (hidden by default, shown when row clicked) -->
@await Component.InvokeAsync("ServiceDetailView", "service-1")
