<template>
  <IxInput :type="passwordVisible ? 'text' : 'password'" prefix="lock" v-bind="$attrs">
    <template #suffix>
      <IxIcon :name="passwordVisible ? 'eye-invisible' : 'eye'" @click="passwordVisible = !passwordVisible">
      </IxIcon>
    </template>
  </IxInput>
</template>

<script lang="ts" setup>
defineOptions({name: 'IxPwdInput', inheritAttrs: false})
const passwordVisible = ref(false)
</script>
