1import{n as e,s as t,t as n}from"./jsx-runtime-DnlWeMvz.js";import{t as r}from"./navigation-D3UsTlll.js";import{t as i}from"./life-buoy-CQ2rX9WE.js";import{t as a}from"./x-oL-TQBJy.js";import{$d as o,Lp as s,Qd as c,Rp as l,Wp as u,Xd as d,Zd as f,af as p,cf as m,df as h,ef as g,ff as _,fm as v,if as ee,lf as y,nf as b,of as x,rf as S,sf as C,tf as w,uf as T,zp as E}from"./index-DjrYZ1e2.js";import{t as D}from"./utils-DXalBF5w.js";import{n as O,t as k}from"./button-B0YAmmdE.js";import{t as A}from"./label-CyKV8aku.js";import{t as j}from"./input-DsRd72w-.js";import{a as M,i as N,n as P,o as te,r as F,t as I}from"./dialog-BfPRWr5Y.js";import{t as L}from"./image-uploader-B406IA7X.js";import{t as R}from"./textarea--HRolKVW.js";var z=s(`film`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M7 3v18`,key:`bbkbws`}],[`path`,{d:`M3 7.5h4`,key:`zfgn84`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`path`,{d:`M3 16.5h4`,key:`1230mu`}],[`path`,{d:`M17 3v18`,key:`in4fa5`}],[`path`,{d:`M17 7.5h4`,key:`myr1c1`}],[`path`,{d:`M17 16.5h4`,key:`go4c1d`}]]),B=t(e(),1),V=n();function H(){let{data:e,isPending:t}=v(),n=(E().data??{}).is_blocked_credit_country===`true`,[s,z]=(0,B.useState)(!1),[H,U]=(0,B.useState)(``),[W,G]=(0,B.useState)(``),[K,q]=(0,B.useState)([]),[J,Y]=(0,B.useState)(!1),[X,Z]=(0,B.useState)(0),[Q,$]=(0,B.useState)(!1);async function ne(){if(!H.trim()||!W.trim()){l.error(w());return}$(!0);try{await u(`/api/tickets`,{title:H,content:W,attachments:K}),l.success(g()),z(!1),U(``),G(``),q([]),Z(e=>e+1)}catch(e){l.error(e?.message||`Failed`)}finally{$(!1)}}return n?null:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`button`,{"aria-label":_(),onClick:()=>z(!0),className:D(`fixed right-6 bottom-6 z-50 size-12 rounded-full`,`bg-primary text-primary-foreground shadow-lg`,`flex items-center justify-center`,`transition-all hover:scale-105 hover:shadow-xl`),children:s?(0,V.jsx)(a,{className:`size-5`}):(0,V.jsx)(i,{className:`size-5`})}),(0,V.jsx)(I,{open:s,onOpenChange:z,children:(0,V.jsxs)(P,{children:[(0,V.jsxs)(M,{children:[(0,V.jsx)(te,{children:h()}),(0,V.jsx)(F,{children:T()})]}),!t&&!e?.user?(0,V.jsxs)(`div`,{className:`flex flex-col items-center gap-4 py-6 text-center`,children:[(0,V.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:y()}),(0,V.jsx)(r,{href:`/sign-in`,className:D(O()),children:m()})]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`space-y-4 py-2`,children:[(0,V.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,V.jsx)(A,{htmlFor:`support-title`,children:C()}),(0,V.jsx)(j,{id:`support-title`,value:H,maxLength:200,onChange:e=>U(e.target.value),placeholder:x()})]}),(0,V.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,V.jsx)(A,{htmlFor:`support-content`,children:p()}),(0,V.jsx)(R,{id:`support-content`,value:W,maxLength:5e3,rows:5,onChange:e=>G(e.target.value),placeholder:ee()})]}),(0,V.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,V.jsx)(A,{children:d()}),(0,V.jsx)(L,{allowMultiple:!0,maxImages:9,onChange:e=>{q(e.filter(e=>e.status===`uploaded`&&e.url).map(e=>e.url)),Y(e.some(e=>e.status===`uploading`))}},X)]}),(0,V.jsxs)(`p`,{className:`text-muted-foreground text-xs`,children:[S(),` `,(0,V.jsx)(r,{href:`/settings/tickets`,className:`hover:text-foreground underline`,children:b()})]})]}),(0,V.jsxs)(N,{children:[(0,V.jsx)(k,{variant:`outline`,onClick:()=>z(!1),children:o()}),(0,V.jsx)(k,{onClick:ne,disabled:Q||J,children:Q?f():c()})]})]})]})})]})}export{z as n,H as t};
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.