<script lang="ts">
    import InputWithLabel from "../forms/InputWithLabel.svelte";

    export let onValidate = (p) => {
    }
    let password = ""
    export let validate = "Valider"
    export let cancel = ()=>{}
    export let cancelMsg = "Annuler"
</script>

<div class="confirm">
    <h1>Veuillez confirmer votre identité</h1>
    <InputWithLabel bind:value={password} type="password" label="Mot de passe"/>
    <div>
        <button class="primary-btn" on:click={()=>{
    onValidate(password)
}}>{validate}
        </button>
        <button class="danger-btn" on:click={cancel}>{cancelMsg}</button>
    </div>
</div>
<style lang="scss">
  .confirm {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 25px;
    height: 100%;
    background: $background;
    padding: 30px 18px;
    border-radius: 5px;
  }
</style>