<script setup>
const props = defineProps({
  forget_password_enabled: { type: String, required: false, default: "0" },
  forget_password_subject: { type: String, required: false, default: "" },
  forget_password_template: { type: String, required: false, default: "" }
});
const emit = defineEmits(["submit"]);
const processedEnabled = props.forget_password_enabled !== "0" ? "1" : props.forget_password_enabled;
const processedSubject = props.forget_password_subject || "Password Reset Code";
const processedTemplate = props.forget_password_template || "Your password reset code is: {code}";
const onSubmit = async (d) => {
  emit("submit", d);
};
</script>

<template>
    <form-kit :bordered="false" type="l-form" :value="{
  forget_password_enabled: processedEnabled,
  forget_password_subject: processedSubject,
  forget_password_template: processedTemplate
}" @submit="onSubmit">
        <form-kit type="l-checkbox" label="Forget Password Enabled" name="forget_password_enabled" true-value="1"
            false-value="0" />

        <form-kit type="l-input" label="Forget Password Subject" name="forget_password_subject" />
        <form-kit type="l-input" label="Forget Password Template" name="forget_password_template"
            input-type="textarea" />

    </form-kit>
</template>
