#import "/assets/icons/eye.ftl" as iconEye>
<#import "/assets/icons/eye-slash.ftl" as iconEyeSlash>
<#macro
kw
autofocus=false
class="block border-secondary-200 mt-1 rounded-md w-full focus:border-primary-300 focus:ring focus:ring-primary-200 focus:ring-opacity-50 sm:text-sm"
disabled=false
invalid=false
label=""
message=""
name=""
required=true
type="text"
rest...
>
<#if type == "password">
autofocus#if>
<#if disabled>disabled#if>
<#if required>required#if>
aria-invalid="${invalid?c}"
class="${class}"
id="${name}"
name="${name}"
placeholder="${label}"
:type="show ? 'text' : 'password'"
<#list rest as attrName, attrValue>
${attrName}="${attrValue}"
#list>
>
<#else>
autofocus#if>
<#if disabled>disabled#if>
<#if required>required#if>
aria-invalid="${invalid?c}"
class="${class}"
id="${name}"
name="${name}"
placeholder="${label}"
type="${type}"
<#list rest as attrName, attrValue>
${attrName}="${attrValue}"
#list>
>
#if>
<#if invalid?? && message??>
${message?no_esc}
#if>
#macro>