import{T as g,r as w,h as y,f as h,o as n,a as s,c as d,t as i,e as m,k,u as o,l as q,g as $,n as c}from"./app-43851608.js";import V from"./App-ad5f7ecb.js";import{_}from"./FormTextArea-a182534a.js";import{_ as S}from"./FormSelect-2d73589a.js";import"./Sidebar-7bb6d772.js";import"./Menu-4221d61f.js";import"./ProfileModal-628e5b7c.js";import"./FormInput-4a309017.js";import"./LangToggle-8d05b0dc.js";import"./MobileSidebar-b73cd192.js";import"./index-99011d5f.js";/* empty css              */import"./index-17cd980e.js";import"./use-text-value-242aa4d7.js";import"./ChevronUpDownIcon-8859f144.js";const A={class:"p-8 rounded-[5px] text-[#000] overflow-y-scroll"},B={class:"flex justify-between"},C={key:0,class:"text-xl mb-1"},F={key:1,class:"text-xl mb-1"},Q={class:"mb-6 flex items-center text-sm leading-6 text-gray-600"},U=s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24"},[s("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 11v5m0 5a9 9 0 1 1 0-18a9 9 0 0 1 0 18Zm.05-13v.1h-.1V8h.1Z"})],-1),j={key:0,class:"ml-1 mt-1"},N={key:1,class:"ml-1 mt-1"},D={class:"sm:flex border-b py-5"},M={class:"hidden sm:block sm:w-[40%] mb-1"},O={class:"text-sm text-gray-500 tracking-[0px]"},R={class:"sm:w-[60%] sm:flex space-x-6"},T={class:"sm:w-[80%] grid gap-x-6 gap-y-4 sm:grid-cols-6"},Z={class:"sm:flex border-b py-5"},z={class:"hidden sm:block sm:w-[40%] mb-1"},E={class:"text-sm text-gray-500 tracking-[0px]"},H={class:"sm:w-[60%] sm:flex space-x-6"},G={class:"sm:w-[80%] grid gap-x-6 gap-y-4 sm:grid-cols-6"},I={class:"sm:flex border-b py-5"},J={class:"hidden sm:block w-[40%] mb-1"},K={class:"text-sm text-gray-500 tracking-[0px]"},L={class:"sm:w-[60%] sm:flex space-x-6"},P={class:"sm:w-[80%] grid gap-x-6 gap-y-4 sm:grid-cols-1"},W={class:"py-6"},X={type:"submit",class:"float-right flex items-center space-x-4 rounded-md bg-black px-3 py-2 text-sm text-white shadow-sm hover:bg-slate-600 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"},fs={__name:"Show",props:{title:String,faq:Object},setup(v){var p,u,f;const l=v,t=g({question:(p=l.faq)==null?void 0:p.question,answer:(u=l.faq)==null?void 0:u.answer,status:(f=l.faq)==null?void 0:f.status}),x=w([{value:0,label:"Hide"},{value:1,label:"Display"}]),b=async()=>{const e=l.faq?window.location.pathname:"/admin/faqs";t[l.faq?"put":"post"](e,{preserveScroll:!0})};return(e,a)=>(n(),y(V,null,{default:h(()=>[s("div",A,[s("div",B,[s("div",null,[l.faq===null?(n(),d("h1",C,i(e.$t("Create FAQ")),1)):(n(),d("h1",F,i(e.$t("Update FAQ")),1)),s("p",Q,[U,l.faq===null?(n(),d("span",j,i(e.$t("Create FAQ")),1)):(n(),d("span",N,i(e.$t("Update FAQ")),1))])]),s("div",null,[m(o(q),{href:"/admin/faqs",class:"rounded-md bg-indigo-600 px-3 py-2 text-sm text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"},{default:h(()=>[k(i(e.$t("Back")),1)]),_:1})])]),s("form",{onSubmit:a[3]||(a[3]=$(r=>b(),["prevent"])),class:"bg-white border py-5 px-5 rounded-[0.5rem]"},[s("div",D,[s("div",M,[s("h1",O,i(e.$t("Question")),1)]),s("div",R,[s("div",T,[m(_,{modelValue:o(t).question,"onUpdate:modelValue":a[0]||(a[0]=r=>o(t).question=r),name:"",error:o(t).errors.question,type:"text",textAreaRows:4,class:c("sm:col-span-6")},null,8,["modelValue","error"])])])]),s("div",Z,[s("div",z,[s("h1",E,i(e.$t("Answer")),1)]),s("div",H,[s("div",G,[m(_,{modelValue:o(t).answer,"onUpdate:modelValue":a[1]||(a[1]=r=>o(t).answer=r),name:"",error:o(t).errors.answer,type:"text",textAreaRows:4,class:c("sm:col-span-6")},null,8,["modelValue","error"])])])]),s("div",I,[s("div",J,[s("h1",K,i(e.$t("Status")),1)]),s("div",L,[s("div",P,[m(S,{modelValue:o(t).status,"onUpdate:modelValue":a[2]||(a[2]=r=>o(t).status=r),options:x.value,error:o(t).errors.status,name:"",class:c("sm:col-span-3"),placeholder:e.$t("Select status")},null,8,["modelValue","options","error","placeholder"])])])]),s("div",W,[s("button",X,i(e.$t("Save")),1)])],32)])]),_:1}))}};export{fs as default};
