import{r,b as k,d,o as n,f as u,c as _,a as e,H as p,w as x,e as v,g as B,i as f}from"./app-91dba96b.js";import{i as y}from"./index-0653e21c.js";import{_ as C}from"./lodash-569b8a6d.js";import"./appFunction-1b5b1f43.js";import"./_commonjsHelpers-725317a4.js";const N={key:1},U={class:"row"},w={class:"col-md-12"},S={class:"form-group col-sm-12 mb-5",style:{height:"300px"}},D=e("label",{for:"privacy_policy",class:"col-form-label"},"Privacy Policy",-1),E={class:"col-md-12"},M={class:"form-group col-sm-12 mb-5 mt-5",style:{height:"300px"}},P=e("label",{for:"support",class:"col-form-label"},"Support",-1),T={class:"col-md-12"},A={class:"form-group col-sm-12 mt-5",style:{height:"300px"}},H=e("label",{for:"terms_and_conditions",class:"col-form-label"},"Terms and Conditions",-1),L={class:"col-md-4 mt-5"},$={key:0,class:"form-group mt-5"},j=["disabled"],K={__name:"privacySupport",setup(q){const l=r(!1),t=r({}),m=r({}),b=()=>{l.value=!0,m.value={},y.post("privacy-support",t.value).then(({data:o})=>{f.success(o.message)}).catch(({response:o})=>{o.status===422?m.value=o.data.errors:f.error(o.data.message)}).finally(()=>{l.value=!1})},i=r(!1),h=()=>{i.value=!0,y.get("settings").then(({data:o})=>{C.isEmpty(o)||(t.value=o)}).finally(()=>i.value=!1)};return k(()=>{h()}),(o,s)=>{const g=d("app-loader"),c=d("app-input"),V=d("app-button-loader");return i.value?(n(),u(g,{key:0})):(n(),_("form",N,[e("div",U,[e("div",w,[e("div",S,[D,p(c,{modelValue:t.value.privacy_policy,"onUpdate:modelValue":s[0]||(s[0]=a=>t.value.privacy_policy=a),type:"editor"},null,8,["modelValue"])])]),e("div",E,[e("div",M,[P,p(c,{modelValue:t.value.support,"onUpdate:modelValue":s[1]||(s[1]=a=>t.value.support=a),type:"editor"},null,8,["modelValue"])])]),e("div",T,[e("div",A,[H,p(c,{modelValue:t.value.terms_and_conditions,"onUpdate:modelValue":s[2]||(s[2]=a=>t.value.terms_and_conditions=a),type:"editor"},null,8,["modelValue"])])]),e("div",L,[o.$canAccess("update_setting")?(n(),_("div",$,[e("button",{type:"submit",class:"btn btn-primary action-btn py-2 px-3",disabled:l.value,onClick:x(b,["prevent"])},[l.value?(n(),u(V,{key:0})):v("",!0),B(" Update ")],8,j)])):v("",!0)])])]))}}};export{K as default};
