<template>
  <q-input
    v-model="password"
    v-bind="$attrs"
    :label="$t('common.terms.password')"
    :type="!seePassword ? 'password' : 'text'"
    :rules="rules"
  >
    <template #append>
      <q-icon
        :name="seePassword ? 'mdi-eye-off-outline' : 'mdi-eye-outline'"
        class="cursor-pointer q-ml-md"
        color="primary"
        @click="seePassword = !seePassword"
      />
    </template>
  </q-input>
</template>
<script setup>
const { rules } = defineProps({
  rules: {
    type: Array,
    default: () => [],
  },
});

const password = defineModel();
const seePassword = defineModel("seePassword", { default: false });
</script>
