import{G as R,H as A,u as F,r as p,o as g,e as k,h as d,f as e,B as f,E as i,i as t,aG as v,aH as _,V as b,bj as h,A as c,j as T,M as x,a3 as y,F as D,$,aV as N}from"./index.737529e8.1750111005555.js";import{V as z}from"./VFileInput.698fbd2b.1750111005555.js";import{V as P}from"./VForm.0aa10138.1750111005555.js";import{V,a as W}from"./VRow.65155936.1750111005555.js";import{V as j}from"./VTextarea.94915313.1750111005555.js";const G={class:"mt-0 text-center"},H=d("p",{class:"mt-0 text-center"},"WhatsApp",-1),I=d("p",{class:"mt-0 text-center"},"E-mail",-1),U=d("p",{class:"mt-0 text-center"},"Reportar um bug",-1),M={key:0},L={__name:"contato",setup(O){const{setAlert:m}=N();R();const B=A();F("userData").value;const C=B.currentRoute.value.name=="contato-bug",w=a=>{a=="whatsapp"&&window.open("https://api.whatsapp.com/send?phone=5522997259567","_blank"),a.startsWith("http")&&window.open(a,"_blank"),a.startsWith("mailto")&&window.open(a,"_blank")},s=p(!1),n=p(""),r=p(null),u=p(!1),E=async()=>{if(u.value=!0,!r.value){m("Por favor, anexe um print ou vídeo do bug.","error","tabler-alert-triangle",5e3),u.value=!1;return}try{let a=r.value;if(console.log("file",a),!a||a.lenght==0){m("Por favor, anexe um print ou vídeo do bug.","error","tabler-alert-triangle",5e3),u.value=!1;return}a=a[0];let l=new FormData;l.append("description",n.value),l.append("file",a),l.append("filename",a.name);const o=await $("/users/bug-report",{method:"POST",body:l});if(!o)return;console.log("Bug reportado com sucesso",o),s.value=!1,n.value="",r.value=null,m("Bug reportado com sucesso! Agradecemos o seu feedback.","success","tabler-check",5e3)}catch(a){m("Erro ao reportar o bug. Tente novamente mais tarde.","error","tabler-alert-triangle",5e3),console.error("Erro ao reportar o bug",a,a.response)}u.value=!1};return C&&(s.value=!0),(a,l)=>(g(),k(D,null,[d("div",null,[d("h2",G,[e(f,{icon:"tabler-phone",class:"mr-1"}),i(" Entre em contato conosco ")])]),e(W,{class:"mt-5"},{default:t(()=>[e(V,{cols:"12",md:"4"},{default:t(()=>[e(v,null,{default:t(()=>[e(_,null,{default:t(()=>[H,e(b,{color:"primary",onClick:l[0]||(l[0]=o=>w("whatsapp")),size:"large",class:"w-100"},{default:t(()=>[e(f,{icon:"tabler-brand-whatsapp",class:"mr-2"}),i(" +55 (22) 99725-9567 ")]),_:1})]),_:1})]),_:1})]),_:1}),e(V,{cols:"12",md:"4"},{default:t(()=>[e(v,null,{default:t(()=>[e(_,null,{default:t(()=>[I,e(b,{color:"primary",onClick:l[1]||(l[1]=o=>w("mailto:suporte@akkiperto.com.br")),size:"large",class:"w-100 text-lowercase"},{default:t(()=>[e(f,{icon:"tabler-mail",class:"mr-2"}),i(" suporte@akkiperto.com.br ")]),_:1})]),_:1})]),_:1})]),_:1}),e(V,{cols:"12",md:"4"},{default:t(()=>[e(v,null,{default:t(()=>[e(_,null,{default:t(()=>[U,e(h,null,{default:t(()=>[c(s)?x("",!0):(g(),T(b,{key:0,color:"primary",onClick:l[2]||(l[2]=o=>s.value=!0),size:"large",class:"w-100"},{default:t(()=>[e(f,{icon:"tabler-bug",class:"mr-2"}),i(" Reportar um bug ")]),_:1}))]),_:1}),e(h,null,{default:t(()=>[c(s)?(g(),k("div",M,[e(P,null,{default:t(()=>[e(j,{modelValue:c(n),"onUpdate:modelValue":l[3]||(l[3]=o=>y(n)?n.value=o:null),label:"Descreva o bug",outlined:"",clearable:"",class:"mt-3",rows:"4"},null,8,["modelValue"]),e(z,{modelValue:c(r),"onUpdate:modelValue":l[4]||(l[4]=o=>y(r)?r.value=o:null),label:"Anexar print ou vídeo",outlined:"",class:"mt-3"},null,8,["modelValue"]),e(b,{color:"primary",onClick:E,class:"mt-3 w-100",loading:c(u)},{default:t(()=>[i(" Enviar ")]),_:1},8,["loading"])]),_:1})])):x("",!0)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})],64))}};export{L as default};
