package customcheckbox

import "cpone/models"

templ MainCustomCheckboxInput(inp models.CustomCheckboxv1Prm) {
	<div class="form-control bg-field border-0 h-auto">
		<div class="form-group">
			<label>{ inp.Label }</label>
			<div class="checkbox-list">
				<label class="checkbox">
					if (inp.Value == "on") {
						<input type="checkbox" name={ inp.Name } id={ inp.ID } checked/>
					} else {
						<input type="checkbox" name={ inp.Name } id={ inp.ID }/>
					}
					<span></span>
					{ inp.Text }
				</label>
			</div>
		</div>
		<div class="invalid-feedback text-danger mt-3 ml-2 mt-5">
			{ inp.ErrorMsg }
		</div>
	</div>
}
