import{b2 as M,q as z,r as m,j as e,C as X,W as H,Y as J,$ as a,f as u,B as v,aG as x,S as W,d as K,a4 as G,a5 as L,a6 as A,a7 as V,a8 as i,X as Q}from"./index-Ef5HIHwv.js";import{T as Z}from"./textarea-DI4Rh5ZE.js";import{u as ee}from"./useEmailTemplates-Dmy9fM1z.js";import{supabase as y}from"./client-D7qhFv0L.js";import{U}from"./upload-axZNWqGM.js";function ne(){const[c]=M(),{toast:b}=z(),{templates:Y}=ee(),[E,O]=m.useState(!1),[q,R]=m.useState(!1),[p,C]=m.useState(""),[d,F]=m.useState(!1),[g,S]=m.useState([]),[P,h]=m.useState(!1),[t,N]=m.useState({firstName:"",lastName:"",email:"",phone:"",bookingRef:"",requestType:"",title:"",description:"",priority:"medium",attachment:null});m.useEffect(()=>{const r=c.get("bookingRef")||c.get("bookingId");r&&_(r)},[c]);const D=async r=>{if(!r.trim()){S([]),h(!1);return}F(!0);try{const{data:o,error:s}=await y.from("bookings").select(`
          *,
          booking_contacts (
            first_name,
            last_name,
            email,
            phone
          )
        `).ilike("booking_code",`%${r}%`).limit(10);if(s)throw s;S(o||[]),h(!0)}catch(o){console.error("Error searching bookings:",o),b({title:"Error searching bookings",description:"There was an error searching for bookings.",variant:"destructive"}),S([]),h(!1)}finally{F(!1)}},k=r=>{var s;const o=(s=r.booking_contacts)==null?void 0:s[0];N(l=>({...l,firstName:(o==null?void 0:o.first_name)||"",lastName:(o==null?void 0:o.last_name)||"",email:(o==null?void 0:o.email)||"",phone:(o==null?void 0:o.phone)||"",bookingRef:r.booking_code||"",requestType:"booking_change",title:`Support Request for Booking ${r.booking_code}`,description:`Booking Reference: ${r.booking_code}
Booking Status: ${r.status}

Please describe your request:`})),C(r.booking_code),h(!1),S([]),b({title:"Booking Selected!",description:`Booking ${r.booking_code} selected and form data prefilled.`})},_=async r=>{R(!0),await D(r),R(!1)},w=async(r=5)=>{for(let o=0;o<r;o++)try{const{data:s,error:l}=await y.rpc("generate_request_number");if(l)throw l;const{data:f,error:j}=await y.from("customer_requests").select("id").eq("request_number",s).single();if(j&&j.code==="PGRST116")return s;if(f){console.log(`Request number ${s} already exists, retrying...`);continue}return s}catch(s){if(console.error(`Attempt ${o+1} failed:`,s),o===r-1)throw new Error("Failed to generate unique request number after multiple attempts")}throw new Error("Failed to generate unique request number")},B=async r=>{try{const o=Y.find(f=>f.template_type==="acknowledgment"&&f.is_active);if(!o){console.log("No acknowledgment template found, skipping email");return}const s=o.subject.replace(/\{\{request_number\}\}/g,r).replace(/\{\{customer_first_name\}\}/g,t.firstName).replace(/\{\{booking_ref\}\}/g,t.bookingRef||""),l=o.body.replace(/\{\{request_number\}\}/g,r).replace(/\{\{customer_first_name\}\}/g,t.firstName).replace(/\{\{customer_name\}\}/g,`${t.firstName} ${t.lastName}`.trim()).replace(/\{\{booking_ref\}\}/g,t.bookingRef||"").replace(/\{\{request_type\}\}/g,t.requestType.replace("_"," "));await y.from("email_queue").insert({to_email:t.email,subject:s,body:l,status:"pending"}),console.log("Acknowledgment email queued successfully")}catch(o){console.error("Error sending acknowledgment email:",o)}},T=async r=>{r.preventDefault(),O(!0);try{console.log("Submitting support request:",t);const o=await w();console.log("Generated unique request number:",o);const s={request_number:o,customer_first_name:t.firstName,customer_last_name:t.lastName,customer_email:t.email,customer_phone:t.phone,customer_booking_ref:t.bookingRef,request_type:t.requestType,title:t.title,description:t.description,priority:t.priority},{error:l}=await y.from("notifications").insert({type:"support_request",title:`New Support Request: ${t.title}`,message:`${t.requestType} request from ${t.firstName} ${t.lastName} (${t.email})${t.bookingRef?` - Booking: ${t.bookingRef}`:""}`,priority:t.priority,metadata:s});if(l)throw console.error("Error creating notification:",l),l;await B(o),b({title:"Support Request Submitted Successfully!",description:`Your request ${o} has been received and will appear in our monitoring dashboard for assignment.`}),N({firstName:"",lastName:"",email:"",phone:"",bookingRef:"",requestType:"",title:"",description:"",priority:"medium",attachment:null})}catch(o){console.error("Failed to submit support request:",o),b({title:"Failed to Submit Request",description:"Please try again or contact us directly.",variant:"destructive"})}finally{O(!1)}},n=(r,o)=>{N(s=>({...s,[r]:o}))},$=r=>{var s;const o=((s=r.target.files)==null?void 0:s[0])||null;if(o&&o.size>20*1024*1024){b({title:"File too large",description:"Please select a file smaller than 20MB.",variant:"destructive"});return}n("attachment",o)},I=()=>{n("attachment",null)};return e.jsxDEV("div",{className:"min-h-screen bg-gray-50 py-8",children:e.jsxDEV("div",{className:"container mx-auto max-w-2xl px-4",children:e.jsxDEV(X,{children:[e.jsxDEV(H,{children:[e.jsxDEV(J,{className:"text-2xl text-center",children:"Submit Support Request"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:310,columnNumber:13},this),e.jsxDEV("p",{className:"text-gray-600 text-center",children:["Need help with your booking? Fill out this form and we'll get back to you as soon as possible.",(c.get("bookingRef")||c.get("bookingId"))&&e.jsxDEV("span",{className:"block mt-2 text-sm text-blue-600 font-medium",children:"✓ Booking information has been pre-filled from your request"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:314,columnNumber:17},this),(c.get("bookingRef")||c.get("bookingId"))&&e.jsxDEV("span",{className:"block mt-1 text-sm text-amber-600",children:"⚠️ Please provide your email and phone number below"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:319,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:311,columnNumber:13},this),e.jsxDEV("div",{className:"space-y-4 p-4 bg-blue-50 rounded-lg border border-blue-200 mt-4",children:e.jsxDEV("div",{className:"space-y-2",children:[e.jsxDEV(a,{htmlFor:"bookingSearch",className:"text-blue-900 font-medium text-base",children:"🔍 Search Your Booking (Optional)"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:328,columnNumber:17},this),e.jsxDEV("p",{className:"text-sm text-blue-700",children:"Enter your booking reference to automatically fill your details"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:331,columnNumber:17},this),e.jsxDEV("div",{className:"flex space-x-2",children:[e.jsxDEV("div",{className:"flex-1 relative",children:[e.jsxDEV(u,{id:"bookingSearch",value:p,onChange:r=>{C(r.target.value),r.target.value.length>=3?D(r.target.value):(h(!1),S([]))},placeholder:"e.g., TPV000001, DEMOS123456",className:"flex-1"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:336,columnNumber:21},this),P&&g.length>0&&e.jsxDEV("div",{className:"absolute z-10 w-full mt-1 bg-white border border-gray-200 rounded-md shadow-lg max-h-60 overflow-y-auto",children:g.map(r=>{var o;return e.jsxDEV("div",{onClick:()=>k(r),className:"p-3 hover:bg-gray-50 cursor-pointer border-b border-gray-100 last:border-b-0",children:[e.jsxDEV("div",{className:"font-medium text-sm",children:r.booking_code},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:359,columnNumber:29},this),e.jsxDEV("div",{className:"text-xs text-gray-500",children:["Status: ",r.status," |",((o=r.booking_contacts)==null?void 0:o[0])&&` ${r.booking_contacts[0].first_name} ${r.booking_contacts[0].last_name}`]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:360,columnNumber:29},this)]},r.id,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:354,columnNumber:27},this)})},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:352,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:335,columnNumber:19},this),e.jsxDEV(v,{type:"button",onClick:()=>{p.trim()&&D(p.trim())},disabled:d||!p.trim(),variant:"outline",children:d?e.jsxDEV(x,{className:"h-4 w-4 animate-spin"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:380,columnNumber:23},this):e.jsxDEV(W,{className:"h-4 w-4"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:382,columnNumber:23},this)},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:369,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:334,columnNumber:17},this),P&&g.length===0&&!d&&p.length>=3&&e.jsxDEV("p",{className:"text-sm text-gray-500 mt-2",children:['No bookings found matching "',p,'"']},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:387,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:327,columnNumber:15},this)},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:326,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:309,columnNumber:11},this),e.jsxDEV(K,{children:e.jsxDEV("form",{onSubmit:T,className:"space-y-4",children:[e.jsxDEV("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxDEV("div",{className:"space-y-2",children:[e.jsxDEV(a,{htmlFor:"firstName",children:"First Name *"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:397,columnNumber:19},this),e.jsxDEV(u,{id:"firstName",value:t.firstName,onChange:r=>n("firstName",r.target.value),required:!0,placeholder:"Enter your first name"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:398,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:396,columnNumber:17},this),e.jsxDEV("div",{className:"space-y-2",children:[e.jsxDEV(a,{htmlFor:"lastName",children:"Last Name *"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:407,columnNumber:19},this),e.jsxDEV(u,{id:"lastName",value:t.lastName,onChange:r=>n("lastName",r.target.value),required:!0,placeholder:"Enter your last name"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:408,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:406,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:395,columnNumber:15},this),e.jsxDEV("div",{className:"space-y-2",children:[e.jsxDEV(a,{htmlFor:"email",children:"Email Address *"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:419,columnNumber:17},this),e.jsxDEV(u,{id:"email",type:"email",value:t.email,onChange:r=>n("email",r.target.value),required:!0,placeholder:"Enter your email address"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:420,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:418,columnNumber:15},this),e.jsxDEV("div",{className:"space-y-2",children:[e.jsxDEV(a,{htmlFor:"phone",children:"Phone Number"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:431,columnNumber:17},this),e.jsxDEV(u,{id:"phone",type:"tel",value:t.phone,onChange:r=>n("phone",r.target.value),placeholder:"Enter your phone number"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:432,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:430,columnNumber:15},this),e.jsxDEV("div",{className:"space-y-2",children:[e.jsxDEV(a,{htmlFor:"bookingRef",children:"Booking Reference"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:444,columnNumber:17},this),e.jsxDEV(u,{id:"bookingRef",value:t.bookingRef,onChange:r=>n("bookingRef",r.target.value),placeholder:"e.g., TPV000001"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:445,columnNumber:17},this),e.jsxDEV("p",{className:"text-xs text-gray-600",children:"Or enter manually if search doesn't find your booking"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:451,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:443,columnNumber:15},this),e.jsxDEV("div",{className:"space-y-2",children:[e.jsxDEV(a,{htmlFor:"requestType",children:"Request Type *"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:458,columnNumber:17},this),e.jsxDEV(G,{value:t.requestType,onValueChange:r=>n("requestType",r),children:[e.jsxDEV(L,{children:e.jsxDEV(A,{placeholder:"Select request type"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:461,columnNumber:21},this)},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:460,columnNumber:19},this),e.jsxDEV(V,{children:[e.jsxDEV(i,{value:"booking_change",children:"Booking Change"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:464,columnNumber:21},this),e.jsxDEV(i,{value:"cancellation",children:"Cancellation"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:465,columnNumber:21},this),e.jsxDEV(i,{value:"refund",children:"Refund Request"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:466,columnNumber:21},this),e.jsxDEV(i,{value:"payment_issue",children:"Payment Issue"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:467,columnNumber:21},this),e.jsxDEV(i,{value:"documentation",children:"Documentation"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:468,columnNumber:21},this),e.jsxDEV(i,{value:"complaint",children:"Complaint"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:469,columnNumber:21},this),e.jsxDEV(i,{value:"general_inquiry",children:"General Inquiry"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:470,columnNumber:21},this),e.jsxDEV(i,{value:"other",children:"Other"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:471,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:463,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:459,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:457,columnNumber:15},this),e.jsxDEV("div",{className:"space-y-2",children:[e.jsxDEV(a,{htmlFor:"priority",children:"Priority"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:477,columnNumber:17},this),e.jsxDEV(G,{value:t.priority,onValueChange:r=>n("priority",r),children:[e.jsxDEV(L,{children:e.jsxDEV(A,{},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:480,columnNumber:21},this)},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:479,columnNumber:19},this),e.jsxDEV(V,{children:[e.jsxDEV(i,{value:"low",children:"Low"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:483,columnNumber:21},this),e.jsxDEV(i,{value:"medium",children:"Medium"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:484,columnNumber:21},this),e.jsxDEV(i,{value:"high",children:"High"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:485,columnNumber:21},this),e.jsxDEV(i,{value:"urgent",children:"Urgent"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:486,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:482,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:478,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:476,columnNumber:15},this),e.jsxDEV("div",{className:"space-y-2",children:[e.jsxDEV(a,{htmlFor:"title",children:"Subject *"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:492,columnNumber:17},this),e.jsxDEV(u,{id:"title",value:t.title,onChange:r=>n("title",r.target.value),required:!0,placeholder:"Brief description of your request"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:493,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:491,columnNumber:15},this),e.jsxDEV("div",{className:"space-y-2",children:[e.jsxDEV(a,{htmlFor:"description",children:"Description *"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:503,columnNumber:17},this),e.jsxDEV(Z,{id:"description",value:t.description,onChange:r=>n("description",r.target.value),required:!0,placeholder:"Please provide detailed information about your request",rows:5},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:504,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:502,columnNumber:15},this),e.jsxDEV("div",{className:"space-y-2",children:[e.jsxDEV(a,{htmlFor:"attachment",children:"Attachment (Optional)"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:516,columnNumber:17},this),e.jsxDEV("div",{className:"border-2 border-dashed border-gray-300 rounded-lg p-4",children:t.attachment?e.jsxDEV("div",{className:"flex items-center justify-between bg-gray-50 p-3 rounded",children:[e.jsxDEV("div",{className:"flex items-center space-x-2",children:[e.jsxDEV(U,{className:"h-5 w-5 text-green-600"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:521,columnNumber:25},this),e.jsxDEV("span",{className:"text-sm font-medium",children:t.attachment.name},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:522,columnNumber:25},this),e.jsxDEV("span",{className:"text-xs text-gray-500",children:["(",(t.attachment.size/1024/1024).toFixed(2)," MB)"]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:523,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:520,columnNumber:23},this),e.jsxDEV(v,{type:"button",variant:"ghost",size:"sm",onClick:I,className:"text-red-600 hover:text-red-800",children:e.jsxDEV(Q,{className:"h-4 w-4"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:534,columnNumber:25},this)},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:527,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:519,columnNumber:21},this):e.jsxDEV("div",{className:"text-center",children:[e.jsxDEV(U,{className:"h-8 w-8 text-gray-400 mx-auto mb-2"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:539,columnNumber:23},this),e.jsxDEV("div",{className:"space-y-1",children:[e.jsxDEV("p",{className:"text-sm text-gray-600",children:"Click to upload a file or drag and drop"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:541,columnNumber:25},this),e.jsxDEV("p",{className:"text-xs text-gray-500",children:"Max file size: 20MB"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:542,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:540,columnNumber:23},this),e.jsxDEV(u,{id:"attachment",type:"file",onChange:$,className:"mt-2",accept:".pdf,.doc,.docx,.txt,.jpg,.jpeg,.png,.gif"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:544,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:538,columnNumber:21},this)},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:517,columnNumber:17},this),e.jsxDEV("p",{className:"text-xs text-gray-600",children:"Supported formats: PDF, DOC, DOCX, TXT, JPG, JPEG, PNG, GIF"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:554,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:515,columnNumber:15},this),e.jsxDEV(v,{type:"submit",className:"w-full",disabled:E||q||d,children:E?e.jsxDEV(e.Fragment,{children:[e.jsxDEV(x,{className:"mr-2 h-4 w-4 animate-spin"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:566,columnNumber:21},this),"Submitting Request..."]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:565,columnNumber:19},this):q||d?e.jsxDEV(e.Fragment,{children:[e.jsxDEV(x,{className:"mr-2 h-4 w-4 animate-spin"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:571,columnNumber:21},this),"Loading booking data..."]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:570,columnNumber:19},this):"Submit Support Request"},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:559,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:393,columnNumber:13},this)},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:392,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:308,columnNumber:9},this)},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:307,columnNumber:7},this)},void 0,!1,{fileName:"/Users/abanoubhelmy/Library/CloudStorage/OneDrive-Personal/EASYGDS/Operation System/trip-glide-control/src/components/forms/SupportRequestForm.tsx",lineNumber:306,columnNumber:5},this)}export{ne as S};
