<template>
  <popup v-model:value="value" style="z-index: 999" content-animate="scale" @close="$emit('destroy-popup')">

    <div class="confirm-container relative">

      <div @click="close" v-if="!buttonAsync" class="absolute confirm-icon cursor-pointer animate-rotate-hover">
        <icon type="close" class="confirm-icon-target"></icon>
      </div>

      <article class="confirm-title">{{title}}</article>

      <section class="center">
        <input class="password-input" v-model="passwordValue" type="text" :placeholder="placeholder" />
      </section>

      <section class="rowCenter">
        <v-button @submit-verify="triggerConfirm" :success-text="successAsyncText" @submit="triggerWaiting" class="confirm-button" :class="{'confirm-button-screen':buttonAsync}">{{confirmText||'确定'}}</v-button>
      </section>
    </div>

  </popup>
</template>

<script>
import {
  Popup,
  vButton,
  icon
} from '$components';
import mixins from '../mixins';
import props from '../props';
export default {
  name: "popup-password",
  components:{
    Popup,
    vButton,
    icon
  },
  mixins,
  props
}
</script>

<style scoped lang="scss" src="../style.scss"></style>