import{Z as M,i as A,r as n,c as d,o as f,a as s,b as m,d as I,w as _,e as S,t as L,k as R}from"./app-BhD6J0Va.js";import{I as b}from"./moment-DeOISj6Y.js";import{L as O}from"./Layout-BNWXhjq5.js";import{P as E}from"./Pagination-KBt07-7T.js";import{T as g}from"./TextInput-CRQDtFka.js";import{S as N}from"./SelectInput-Cao9wiYo.js";import{L as P}from"./LoadingButton-BKJMdZnQ.js";import{_ as V}from"./FlashMessages-DW2Y2mP0.js";import"./v4-SoommWqA.js";const w={metaInfo:{title:"Priorities"},components:{Icon:b,Link:A,Head:M,Pagination:E,TextInput:g,SelectInput:N,LoadingButton:P},layout:O,props:{title:String,demo:Boolean,keys:Object},remember:"form",data(){return{form:this.$inertia.form({MAIL_HOST:this.demo?"******************":this.keys.MAIL_HOST.value,MAIL_PORT:this.keys.MAIL_PORT.value,MAIL_USERNAME:this.demo?"**********************":this.keys.MAIL_USERNAME.value,MAIL_PASSWORD:this.demo?"*********":this.keys.MAIL_PASSWORD.value,MAIL_ENCRYPTION:this.keys.MAIL_ENCRYPTION.value,MAIL_FROM_ADDRESS:this.keys.MAIL_FROM_ADDRESS.value,MAIL_FROM_NAME:this.keys.MAIL_FROM_NAME.value})}},methods:{update(){this.form.put(this.route("settings.smtp.update"),{onSuccess:()=>{R.get(this.route("clear.cache","config")).then(l=>{})}})}},created(){console.log(this.demo)}},T={class:"bg-white rounded-md shadow overflow-hidden mr-2"},y={class:"p-8 -mr-6 -mb-8 flex flex-wrap"},D={class:"px-8 py-4 bg-gray-50 border-t border-gray-100 flex items-center"};function v(l,o,u,U,e,i){const a=n("Head"),t=n("text-input"),p=n("loading-button");return f(),d("div",null,[s(a,{title:u.title},null,8,["title"]),m("div",T,[m("form",{onSubmit:o[7]||(o[7]=I((...r)=>i.update&&i.update(...r),["prevent"]))},[m("div",y,[s(t,{modelValue:e.form.MAIL_HOST,"onUpdate:modelValue":o[0]||(o[0]=r=>e.form.MAIL_HOST=r),error:e.form.errors.MAIL_HOST,class:"pr-6 pb-8 w-full lg:w-1/3",label:l.$t("SMTP Host")},null,8,["modelValue","error","label"]),s(t,{modelValue:e.form.MAIL_PORT,"onUpdate:modelValue":o[1]||(o[1]=r=>e.form.MAIL_PORT=r),error:e.form.errors.MAIL_PORT,class:"pr-6 pb-8 w-full lg:w-1/3",label:l.$t("SMTP Port")},null,8,["modelValue","error","label"]),s(t,{modelValue:e.form.MAIL_USERNAME,"onUpdate:modelValue":o[2]||(o[2]=r=>e.form.MAIL_USERNAME=r),error:e.form.errors.MAIL_USERNAME,class:"pr-6 pb-8 w-full lg:w-1/3",label:l.$t("SMTP Username")},null,8,["modelValue","error","label"]),s(t,{modelValue:e.form.MAIL_PASSWORD,"onUpdate:modelValue":o[3]||(o[3]=r=>e.form.MAIL_PASSWORD=r),error:e.form.errors.MAIL_PASSWORD,class:"pr-6 pb-8 w-full lg:w-1/3",label:l.$t("SMTP Password")},null,8,["modelValue","error","label"]),s(t,{modelValue:e.form.MAIL_ENCRYPTION,"onUpdate:modelValue":o[4]||(o[4]=r=>e.form.MAIL_ENCRYPTION=r),error:e.form.errors.MAIL_ENCRYPTION,class:"pr-6 pb-8 w-full lg:w-1/3",label:l.$t("Mail Encryption")},null,8,["modelValue","error","label"]),s(t,{modelValue:e.form.MAIL_FROM_ADDRESS,"onUpdate:modelValue":o[5]||(o[5]=r=>e.form.MAIL_FROM_ADDRESS=r),error:e.form.errors.MAIL_FROM_ADDRESS,class:"pr-6 pb-8 w-full lg:w-1/3",label:l.$t("From Address")},null,8,["modelValue","error","label"]),s(t,{modelValue:e.form.MAIL_FROM_NAME,"onUpdate:modelValue":o[6]||(o[6]=r=>e.form.MAIL_FROM_NAME=r),error:e.form.errors.MAIL_FROM_NAME,class:"pr-6 pb-8 w-full lg:w-1/3",label:l.$t("From Name")},null,8,["modelValue","error","label"])]),m("div",D,[s(p,{loading:e.form.processing,class:"btn-indigo ml-auto",type:"submit"},{default:_(()=>[S(L(l.$t("Save")),1)]),_:1},8,["loading"])])],32)])])}const Y=V(w,[["render",v]]);export{Y as default};
