1import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{d as t}from"./animation-BmfWTHNX.js";import{t as n}from"./useTranslation-DAhprYe0.js";import{t as r}from"./useDispatch-NAg1f1C6.js";import{t as i}from"./CustomerTicketType-DHu6Sphz.js";import{$ as a,B as o,Ot as s,Pt as c,Tt as l,V as u,_t as d,at as f,j as p,mn as m,y as h}from"./mui-C6SoQiqU.js";import{r as g}from"./index-CCkFuITF.js";import{r as _}from"./vendor-BFRf0H0a.js";import{u as v}from"./chunk-OB3PAWPO-D6lZbUZa.js";import{o as y,vt as b}from"./App-BwogsvNU.js";import{t as x}from"./GoBackButton-DQjyy5oo.js";var S=e(t(),1),C=e=>{let{paths:t}=e,[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(``),[l,u]=(0,S.useState)(i.Complaint),d=r(),f=v(),p=(0,S.useCallback)(async()=>await f(t.support.tickets.root),[f,t.support.tickets.root]),m=(0,S.useCallback)(async()=>{o(!0),await d(b.createTicket({title:s,type:l},``)),o(!1),await p()},[d,p,l,s]),{TICKET_TYPE_COMPLAINT:h,TICKET_TYPE_PAYMENTS:g,TICKET_TYPE_TECHNICAL_QUESTION:_,TICKET_TYPE_REPORT_BUG:y,TICKET_TYPE_OTHER:x}=n();return{isLoading:a,text:s,selectedOption:l,options:(0,S.useMemo)(()=>[{label:h,value:i.Complaint},{label:g,value:i.Payments},{label:_,value:i.TechnicalQuestion},{label:y,value:i.ReportBug},{label:x,value:i.Other}],[h,x,g,y,_]),handleSelect:(0,S.useCallback)(e=>{u(e.target.value)},[u]),handleRequest:m,setText:c,setLoading:o,setSelectedOption:u}},w=_(),T=m(),E=(0,S.memo)(e=>{let t=(0,w.c)(41),r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={paths:{support:{tickets:{root:g.paths.Support.tickets.root}}}},t[0]=r):r=t[0];let{isLoading:i,text:o,selectedOption:m,options:_,handleSelect:v,handleRequest:b,setText:S}=C(r),{SUPPORT_CREATE_TEXT:E,SUPPORT_TICKET_CREATE_NEW_TICKET:O,SEND:k}=n();if(i){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsx)(y,{}),t[1]=e):e=t[1],e}let A;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(A={padding:{xs:2,sm:3,laptop:3,lg:4},display:`flex`,flexDirection:`column`,flex:1,height:`100%`},t[2]=A):A=t[2];let j;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(j={xs:3},t[3]=j):j=t[3];let M,N;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(M={xs:2,sm:3},N={md:0},t[4]=M,t[5]=N):(M=t[4],N=t[5]);let P;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,T.jsx)(p,{display:`flex`,flexDirection:`row`,justifyContent:`start`,width:`100%`,children:(0,T.jsx)(x,{customLink:g.paths.Support.tickets.root})}),t[6]=P):P=t[6];let F;t[7]===O?F=t[8]:(F=(0,T.jsx)(p,{direction:`row`,spacing:2,justifyContent:`space-between`,alignItems:`center`,children:(0,T.jsx)(c,{variant:`h5`,marginBottom:2,flexShrink:0,children:(0,T.jsx)(`strong`,{children:O})})}),t[7]=O,t[8]=F);let I;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(I={margin:`auto`},t[9]=I):I=t[9];let L;t[10]===E?L=t[11]:(L=(0,T.jsx)(a,{id:`reason-label`,children:E}),t[10]=E,t[11]=L);let R;t[12]===_?R=t[13]:(R=_.map(D),t[12]=_,t[13]=R);let z;t[14]!==E||t[15]!==v||t[16]!==m||t[17]!==R?(z=(0,T.jsx)(u,{labelId:`reason-label`,id:`reason`,value:m,label:E,onChange:v,children:R}),t[14]=E,t[15]=v,t[16]=m,t[17]=R,t[18]=z):z=t[18];let B;t[19]!==z||t[20]!==L?(B=(0,T.jsxs)(f,{fullWidth:!0,children:[L,z]}),t[19]=z,t[20]=L,t[21]=B):B=t[21];let V;t[22]===S?V=t[23]:(V=e=>S(e.target.value),t[22]=S,t[23]=V);let H;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(H={width:`100%`},t[24]=H):H=t[24];let U;t[25]!==V||t[26]!==o?(U=(0,T.jsx)(p,{spacing:2,children:(0,T.jsx)(h,{id:`message`,label:`Message`,value:o,onChange:V,multiline:!0,sx:H,rows:10})}),t[25]=V,t[26]=o,t[27]=U):U=t[27];let W=!!o,G;t[28]!==k||t[29]!==b?(G=(0,T.jsx)(l,{variant:`outlined`,color:`secondary`,fullWidth:!0,onClick:b,children:k}),t[28]=k,t[29]=b,t[30]=G):G=t[30];let K;t[31]!==W||t[32]!==G?(K=(0,T.jsx)(s,{in:W,timeout:500,children:G}),t[31]=W,t[32]=G,t[33]=K):K=t[33];let q;t[34]!==B||t[35]!==U||t[36]!==K?(q=(0,T.jsxs)(p,{spacing:2,maxWidth:554,width:`100%`,justifyContent:`center`,sx:I,children:[B,U,K]}),t[34]=B,t[35]=U,t[36]=K,t[37]=q):q=t[37];let J;return t[38]!==q||t[39]!==F?(J=(0,T.jsx)(d,{component:`section`,sx:A,children:(0,T.jsxs)(p,{rowGap:j,alignItems:`center`,component:`section`,paddingX:M,paddingRight:N,children:[P,F,q]})}),t[38]=q,t[39]=F,t[40]=J):J=t[40],J});function D(e){return(0,T.jsx)(o,{value:e.value,children:e.label},e.label)}export{E as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.