package masterkelainan

import "cpone/models"

templ CustomTextFieldSelected(inp models.CustomTextFieldSelected) {
	<div class="form-group">
		<label
			if inp.Type == "hidden" {
				class="text-black d-none"
			} else {
				class="text-black"
			}
			style="font-family: Poppins; font-weight: 600;"
		>{ inp.Label } </label>
		<input
			id={ inp.Name }
			hx-swap-oob="true"
			name={ inp.Name }
			type={ inp.Type }
			placeholder={ inp.Placeholder }
			value={ inp.Value }
			if inp.ErrorMsg =="" {
				class="form-control bg-field border-0 h-auto py-6 px-6 rounded-lg"
			} else {
				class="form-control bg-field border-1 h-auto py-6 px-6 rounded-lg is-invalid"
			}
		/>
		<div class="invalid-feedback text-danger mt-3 ml-2">
			{ inp.ErrorMsg }
		</div>
	</div>
}
