package breadcrumadmin

import "cpone/models"

templ MainBreadcrumbAdminV1(data models.BreadCrumbV1) {
	<div class="col-11">
		<h1 class="title text-black" style="margin-bottom: 0">
			{ data.Title }
		</h1>
		<nav aria-label="breadcrumb">
			<ol class="breadcrumb" style="margin-bottom: 0">
				for idx, d := range data.Item {
					if (idx != len(data.Item) - 1) {
						// tidak active
						<li class="breadcrumb-item"><a href={ templ.SafeURL(d.Url) }>{ d.Item }</a></li>
					} else {
						// active
						<li class="breadcrumb-item active" aria-current="page">
							{ d.Item }
						</li>
					}
				}
			</ol>
		</nav>
	</div>
}
