package employee

import (
	"github.com/emarifer/go-templ-project-structure/services"
)

templ CardService(title string, description string, startdate string, enddate string) {
	<a href="">
		<div class="items-content card shadow">
			<div class="row d-flex align-items-center">
				<div class="col-7">
					<h3 class="text-black">{ title }</h3>
				</div>
				<div class="col-md col-lg text-right">
					<span class="text-black font-weight-bolde">{ description }</span>
				</div>
				<div class="col-md col-lg text-right">
					<span class="text-black font-weight-bolde">{ startdate } - { enddate }</span>
				</div>
			</div>
		</div>
	</a>
}

templ ListCardService(cardData []services.EmployeeService) {
	for _, d := range cardData {
		@CardService(d.EmployeeTitle, d.EmployeeDescription, d.EmployeeStartDate, d.EmployeeEndDate)
	}
}

templ HeadingEmployee(title string) {
	<div class="heading d-flex justify-content-between">
		<div class="align-items-center flex-wrap">
			<!--begin::Page Title-->
			<h5 class="text-dark font-weight-bold my-1 mr-5">
				{ title }
			</h5>
			<!--end::Page Title-->
			<!--begin::Breadcrumb-->
			<ul
				class="breadcrumb breadcrumb-transparent font-weight-bold p-0 my-2 font-size-sm"
			>
				<li class="breadcrumb-item">
					<a href="" class="text-muted">Dashboard</a>
				</li>
				<li class="breadcrumb-item">
					<a href="" class="text-muted">Employee Health Medical Analytic</a>
				</li>
			</ul>
			<!--end::Breadcrumb-->
		</div>
		<div class="d-flex align-items-center">
			<!--begin::Actions-->
			<a href="#" class="btn btn-primary font-weight-bolder btn-lg">
				<i class="fas fa-filter"></i> Filter
			</a>
			<!--end::Actions-->
		</div>
	</div>
}
