import{T as v,r as _,q as b,h as w,f as u,o as n,a as e,t as l,e as a,k as x,u as i,l as y,g as k,n as d,c}from"./app-43851608.js";import{_ as V}from"./App-26099fac.js";import{_ as C}from"./FormInput-4a309017.js";import{_ as $}from"./FormSelect-2d73589a.js";import{_ as j}from"./FormTextArea-a182534a.js";import"./index-17cd980e.js";import"./Sidebar-13bbdf6e.js";import"./Menu-7a7609fd.js";import"./Modal-22a49fae.js";import"./ProfileModal-628e5b7c.js";import"./LangToggle-8d05b0dc.js";import"./index-99011d5f.js";import"./MobileSidebar-64958b6d.js";/* empty css              */import"./use-text-value-242aa4d7.js";import"./ChevronUpDownIcon-8859f144.js";const B={class:"bg-white md:bg-inherit pt-0 px-4 md:pt-8 md:p-8 rounded-[5px] text-[#000] overflow-y-scroll"},A={class:"md:flex justify-between hidden"},M={class:"text-xl mb-1"},Z={class:"mb-6 flex items-center text-sm leading-6 text-gray-600"},L=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24"},[e("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),N={class:"ml-1 mt-1"},S=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16"},[e("path",{fill:"currentColor","fill-rule":"evenodd",d:"M5.841 5.28a.75.75 0 0 0-1.06-1.06L1.53 7.47L1 8l.53.53l3.25 3.25a.75.75 0 0 0 1.061-1.06l-1.97-1.97H24.25a.75.75 0 0 0 0-1.5H3.871l1.97-1.97Z","clip-rule":"evenodd"})],-1),D={class:"mt-5 mb-5 grid grid-cols-2 space-x-4"},H={class:""},T={class:""},U={class:""},q={class:"flex justify-end py-2"},z={type:"submit",class:"self-end 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"},E={key:0},F={key:1,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},O=e("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:".5"},null,-1),R=e("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z"},[e("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})],-1),G=[O,R],ne={__name:"Create",props:["categories"],setup(p){const f=p,o=v({subject:null,category:null,message:null}),m=_([]),h=t=>t.map(s=>({value:s.id,label:s.name})),g=()=>{o.post("/support")};return b(()=>{m.value=h(f.categories)}),(t,s)=>(n(),w(V,null,{default:u(()=>[e("div",B,[e("div",A,[e("div",null,[e("h2",M,l(t.$t("Create ticket")),1),e("p",Z,[L,e("span",N,l(t.$t("Have an issue? Describe it in detail below")),1)])]),e("div",null,[a(i(y),{href:"/support",class:"flex items-center space-x-4 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:u(()=>[S,x(" "+l(t.$t("Back")),1)]),_:1})])]),e("form",{onSubmit:s[3]||(s[3]=k(r=>g(),["prevent"])),class:"bg-white md:border py-5 md:px-5 rounded-[0.5rem]"},[e("div",D,[e("div",H,[a(C,{modelValue:i(o).subject,"onUpdate:modelValue":s[0]||(s[0]=r=>i(o).subject=r),name:t.$t("Subject"),type:"text",error:i(o).errors.subject,class:d("w-full"),labelClass:"mb-0"},null,8,["modelValue","name","error"])]),e("div",T,[a($,{modelValue:i(o).category,"onUpdate:modelValue":s[1]||(s[1]=r=>i(o).category=r),name:t.$t("Category"),options:m.value,error:i(o).errors.category,class:d("w-full"),placeholder:t.$t("Select category")},null,8,["modelValue","name","options","error","placeholder"])])]),e("div",U,[a(j,{modelValue:i(o).message,"onUpdate:modelValue":s[2]||(s[2]=r=>i(o).message=r),name:t.$t("Description"),type:"text",showLabel:!0,error:i(o).errors.message,textAreaRows:5,class:d("sm:col-span-6 mb-10")},null,8,["modelValue","name","error"])]),e("div",q,[e("button",z,[t.isLoading?(n(),c("svg",F,G)):(n(),c("span",E,l(t.$t("Create ticket")),1))])])],32)])]),_:1}))}};export{ne as default};
