1"use strict";(globalThis.webpackChunkreact_ts=globalThis.webpackChunkreact_ts||[]).push([[2360],{32518(e,s,t){t.r(s);var a=t(5544),l=t(9950),r=t(52828),i=t(46355),n=t(52224),c=(t(40978),t(14703)),m=t(53034),o=t(81850),d=(t(19201),t(41420)),x=(t(7838),t(67637)),p=t(86009),u=(t(29126),t(59807)),h=t(52607),g=t(13147),f=t(89318),j=(t(68935),t(84814)),b=t(29975),y=t(96479),v=t(16255),N=t(42461),w=(t(60348),t(2700)),k=t(20443),C=t(46381),A=t(44414);const S=e=>{let s=e.active,t=e.label,a=e.icon,l=e.onClick;return(0,A.jsxs)("button",{onClick:l,className:"flex items-center gap-2 px-3 py-2 rounded-lg transition-colors whitespace-nowrap text-sm sm:text-base "+(s?"bg-blue-100 text-blue-700":"text-gray-600 hover:bg-gray-100"),children:[(0,A.jsx)(a,{className:"h-3 w-3 sm:h-4 sm:w-4"}),(0,A.jsx)("span",{children:t})]})},P=()=>{const e=(0,l.useState)("promotions"),s=(0,a.A)(e,2),t=s[0],P=s[1],F=(0,l.useState)(""),q=(0,a.A)(F,2),R=q[0],$=q[1],M=(0,l.useState)("all"),T=(0,a.A)(M,2),E=T[0],Q=T[1],z=(0,l.useState)(!1),V=(0,a.A)(z,2),L=V[0],O=V[1],D=(0,l.useState)(!1),I=(0,a.A)(D,2),U=I[0],_=I[1],W=(0,l.useState)(null),Z=(0,a.A)(W,2),B=Z[0],H=Z[1],J=(0,l.useState)(!0),K=(0,a.A)(J,2),G=K[0],X=K[1],Y=(0,l.useState)(!1),ee=(0,a.A)(Y,2),se=ee[0],te=ee[1],ae=(0,l.useState)([]),le=(0,a.A)(ae,2),re=(le[0],le[1],(0,l.useState)([])),ie=(0,a.A)(re,2),ne=(ie[0],ie[1],(0,l.useState)(2)),ce=(0,a.A)(ne,2),me=ce[0],oe=ce[1],de=(0,l.useState)({formType:"all",status:"all",region:"all"}),xe=(0,a.A)(de,2),pe=(xe[0],xe[1],(0,l.useState)(!1)),ue=(0,a.A)(pe,2),he=ue[0],ge=ue[1],fe=(0,l.useState)(!1),je=(0,a.A)(fe,2),be=je[0],ye=je[1],ve=(0,l.useState)(null),Ne=(0,a.A)(ve,2),we=Ne[0],ke=(Ne[1],e=>{let s=e.isOpen,t=e.onClose,r=e.user;const i=(0,l.useState)("banner"),n=(0,a.A)(i,2),c=n[0],m=n[1],o=(0,l.useState)(""),d=(0,a.A)(o,2),x=d[0],p=d[1],u=(0,l.useState)(""),h=(0,a.A)(u,2),g=h[0],f=h[1],j=(0,l.useState)("normal"),b=(0,a.A)(j,2),v=b[0],w=b[1],k=(0,l.useState)(""),C=(0,a.A)(k,2),S=C[0],P=C[1],F=(0,l.useState)(""),q=(0,a.A)(F,2),R=q[0],$=q[1];return s&&r?(0,A.jsx)("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center p-2 sm:p-4",style:{textAlign:"left"},children:(0,A.jsxs)("div",{className:"bg-white rounded-xl w-full max-w-2xl max-h-[90vh] overflow-y-auto",children:[(0,A.jsx)("div",{className:"p-4 sm:p-6 border-b sticky top-0 bg-white z-10",children:(0,A.jsxs)("div",{className:"flex items-center justify-between",children:[(0,A.jsxs)("h2",{className:"text-lg sm:text-xl font-semibold",children:["Send Notification to ",r.name]}),(0,A.jsx)("button",{onClick:t,className:"p-2 hover:bg-gray-100 rounded-full",children:(0,A.jsx)(y.A,{className:"h-4 w-4 sm:h-5 sm:w-5"})})]})}),(0,A.jsxs)("div",{className:"p-4 sm:p-6 space-y-4",children:[(0,A.jsxs)("div",{children:[(0,A.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Notification Type"}),(0,A.jsxs)("select",{className:"w-full px-3 py-2 border rounded-lg",value:c,onChange:e=>m(e.target.value),children:[(0,A.jsx)("option",{value:"banner",children:"Banner"}),(0,A.jsx)("option",{value:"popup",children:"Popup"}),(0,A.jsx)("option",{value:"message",children:"In-app Message"}),(0,A.jsx)("option",{value:"email",children:"Email"})]})]}),(0,A.jsxs)("div",{children:[(0,A.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Title"}),(0,A.jsx)("input",{type:"text",className:"w-full px-3 py-2 border rounded-lg",placeholder:"Enter notification title",value:x,onChange:e=>p(e.target.value)})]}),(0,A.jsxs)("div",{children:[(0,A.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Message"}),(0,A.jsx)("textarea",{className:"w-full px-3 py-2 border rounded-lg",rows:4,placeholder:"Enter notification message",value:g,onChange:e=>f(e.target.value)})]}),(0,A.jsxs)("div",{children:[(0,A.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Priority"}),(0,A.jsxs)("select",{className:"w-full px-3 py-2 border rounded-lg",value:v,onChange:e=>w(e.target.value),children:[(0,A.jsx)("option",{value:"low",children:"Low"}),(0,A.jsx)("option",{value:"normal",children:"Normal"}),(0,A.jsx)("option",{value:"high",children:"High"}),(0,A.jsx)("option",{value:"urgent",children:"Urgent"})]})]}),(0,A.jsxs)("div",{children:[(0,A.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Action URL (Optional)"}),(0,A.jsx)("input",{type:"text",className:"w-full px-3 py-2 border rounded-lg",placeholder:"Enter URL for notification action",value:S,onChange:e=>P(e.target.value)})]}),(0,A.jsxs)("div",{children:[(0,A.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Expiry (Optional)"}),(0,A.jsx)("input",{type:"datetime-local",className:"w-full px-3 py-2 border rounded-lg",value:R,onChange:e=>$(e.target.value)})]}),(0,A.jsxs)("div",{className:"pt-4 border-t flex justify-end gap-3",children:[(0,A.jsx)(N.$,{variant:"outline",onClick:t,children:"Cancel"}),(0,A.jsx)(N.$,{children:"Send Notification"})]})]})]})}):null}),Ce=e=>{let s=e.isOpen,t=e.onClose,i=e.user;const n=(0,l.useState)((null===i||void 0===i?void 0:i.permissions.camera)||!1),c=(0,a.A)(n,2),m=c[0],x=c[1],p=(0,l.useState)((null===i||void 0===i?void 0:i.permissions.notifications)||!1),u=(0,a.A)(p,2),h=u[0],g=u[1];return s&&i?(0,A.jsx)("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center p-2 sm:p-4",style:{textAlign:"left"},children:(0,A.jsxs)("div",{className:"bg-white rounded-xl w-full max-w-2xl max-h-[90vh] overflow-y-auto",children:[(0,A.jsx)("div",{className:"p-4 sm:p-6 border-b sticky top-0 bg-white z-10",children:(0,A.jsxs)("div",{className:"flex items-center justify-between",children:[(0,A.jsxs)("h2",{className:"text-lg sm:text-xl font-semibold",children:["Manage Permissions for ",i.name]}),(0,A.jsx)("button",{onClick:t,className:"p-2 hover:bg-gray-100 rounded-full",children:(0,A.jsx)(y.A,{className:"h-4 w-4 sm:h-5 sm:w-5"})})]})}),(0,A.jsxs)("div",{className:"p-4 sm:p-6 space-y-4",children:[(0,A.jsx)("div",{className:"bg-blue-50 p-4 rounded-lg",children:(0,A.jsxs)("div",{className:"flex items-start gap-3",children:[(0,A.jsx)(r.A,{className:"h-5 w-5 text-blue-600 mt-0.5"}),(0,A.jsx)("p",{className:"text-sm text-blue-700",children:"Changing permissions will affect this user's ability to interact with certain features of the platform."})]})}),(0,A.jsxs)("div",{className:"space-y-4",children:[(0,A.jsxs)("div",{className:"flex items-center justify-between p-4 bg-gray-50 rounded-lg",children:[(0,A.jsxs)("div",{className:"flex items-center gap-2",children:[(0,A.jsx)(d.A,{className:"h-5 w-5 text-gray-700"}),(0,A.jsxs)("div",{children:[(0,A.jsx)("p",{className:"font-medium",children:"Camera Access"}),(0,A.jsx)("p",{className:"text-sm text-gray-500",children:"Allow the user to use video call features"})]})]}),(0,A.jsxs)("div",{className:"relative inline-flex items-center cursor-pointer",children:[(0,A.jsx)("input",{type:"checkbox",value:"",className:"sr-only peer",checked:m,onChange:()=>x(!m)}),(0,A.jsx)("div",{className:"w-11 h-6 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"})]})]}),(0,A.jsxs)("div",{className:"flex items-center justify-between p-4 bg-gray-50 rounded-lg",children:[(0,A.jsxs)("div",{className:"flex items-center gap-2",children:[(0,A.jsx)(o.A,{className:"h-5 w-5 text-gray-700"}),(0,A.jsxs)("div",{children:[(0,A.jsx)("p",{className:"font-medium",children:"Notification Access"}),(0,A.jsx)("p",{className:"text-sm text-gray-500",children:"Allow the user to receive notifications"})]})]}),(0,A.jsxs)("div",{className:"relative inline-flex items-center cursor-pointer",children:[(0,A.jsx)("input",{type:"checkbox",value:"",className:"sr-only peer",checked:h,onChange:()=>g(!h)}),(0,A.jsx)("div",{className:"w-11 h-6 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"})]})]})]}),(0,A.jsxs)("div",{className:"pt-4 border-t flex justify-end gap-3",children:[(0,A.jsx)(N.$,{variant:"outline",onClick:t,children:"Cancel"}),(0,A.jsx)(N.$,{children:"Save Changes"})]})]})]})}):null},Ae=e=>{let s=e.isOpen,t=e.onClose,i=e.form;const n=(0,l.useState)(i?{...i}:{}),o=(0,a.A)(n,2),d=o[0],x=o[1],p=(0,l.useState)("fields"),u=(0,a.A)(p,2),g=u[0],f=u[1];if(!s||!i)return null;const b=(e,s,t)=>{const a=[...d.fields];a[e]={...a[e],[s]:t},x({...d,fields:a})},v=(e,s)=>{if("up"===s&&0===e||"down"===s&&e===d.fields.length-1)return;const t=[...d.fields],a="up"===s?e-1:e+1;var l=[t[a],t[e]];t[e]=l[0],t[a]=l[1],x({...d,fields:t})},w=(e,s,t)=>{x({...d,pricing:{...d.pricing,[e]:{...d.pricing[e],[s]:t}}})},k=(e,s)=>{x({...d,settings:{...d.settings,[e]:s}})};return(0,A.jsx)("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center p-2 sm:p-4",children:(0,A.jsxs)("div",{className:"bg-white rounded-lg w-full max-w-full sm:max-w-6xl max-h-[90vh] overflow-y-auto",children:[(0,A.jsx)("div",{className:"p-4 sm:p-6 border-b sticky top-0 bg-white z-10",children:(0,A.jsxs)("div",{className:"flex items-center justify-between",children:[(0,A.jsxs)("h2",{className:"text-lg sm:text-xl font-semibold",children:["Edit Form: ",i.name]}),(0,A.jsx)(N.$,{variant:"ghost",size:"sm",onClick:t,children:(0,A.jsx)(y.A,{className:"h-4 w-4 sm:h-5 sm:w-5"})})]})}),(0,A.jsxs)("div",{className:"flex flex-col sm:flex-row border-b overflow-x-auto",children:[(0,A.jsx)("button",{onClick:()=>f("fields"),className:"px-4 py-2 sm:px-6 sm:py-3 font-medium text-sm sm:text-base whitespace-nowrap "+("fields"===g?"border-b-2 border-blue-600 text-blue-600":"text-gray-600"),children:"Form Fields"}),(0,A.jsx)("button",{onClick:()=>f("pricing"),className:"px-4 py-2 sm:px-6 sm:py-3 font-medium text-sm sm:text-base whitespace-nowrap "+("pricing"===g?"border-b-2 border-blue-600 text-blue-600":"text-gray-600"),children:"Pricing & Commission"}),(0,A.jsx)("button",{onClick:()=>f("settings"),className:"px-4 py-2 sm:px-6 sm:py-3 font-medium text-sm sm:text-base whitespace-nowrap "+("settings"===g?"border-b-2 border-blue-600 text-blue-600":"text-gray-600"),children:"Settings"})]}),(0,A.jsxs)("div",{className:"p-4 sm:p-6",children:["fields"===g&&(0,A.jsxs)("div",{className:"space-y-4 sm:sp
1ace-y-6",children:[(0,A.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-2",children:[(0,A.jsx)("h3",{className:"font-medium text-base sm:text-lg",children:"Form Fields"}),(0,A.jsxs)(N.$,{onClick:()=>{const e={id:`field_${d.fields.length+1}`,label:"New Field",type:"text",required:!1};x({...d,fields:[...d.fields,e]})},className:"w-full sm:w-auto flex items-center gap-2 text-sm",children:[(0,A.jsx)(h.A,{className:"h-3 w-3 sm:h-4 sm:w-4"})," Add Field"]})]}),(0,A.jsx)("div",{className:"space-y-4",children:d.fields.map((e,s)=>(0,A.jsxs)("div",{className:"p-3 sm:p-4 border rounded-lg bg-gray-50",children:[(0,A.jsxs)("div",{className:"flex flex-col sm:flex-row items-start justify-between mb-3 sm:mb-4 gap-2",children:[(0,A.jsxs)("div",{className:"flex items-center gap-2",children:[(0,A.jsxs)("div",{className:"flex flex-col",children:[(0,A.jsx)(N.$,{variant:"ghost",size:"sm",onClick:()=>v(s,"up"),disabled:0===s,children:(0,A.jsx)(m.A,{className:"h-3 w-3 sm:h-4 sm:w-4"})}),(0,A.jsx)(N.$,{variant:"ghost",size:"sm",onClick:()=>v(s,"down"),disabled:s===d.fields.length-1,children:(0,A.jsx)(c.A,{className:"h-3 w-3 sm:h-4 sm:w-4"})})]}),(0,A.jsxs)("span",{className:"font-medium text-sm sm:text-base",children:["Field ",s+1]})]}),(0,A.jsx)(N.$,{variant:"ghost",size:"sm",className:"text-red-600",onClick:()=>(e=>{const s=[...d.fields];s.splice(e,1),x({...d,fields:s})})(s),children:(0,A.jsx)(j.A,{className:"h-3 w-3 sm:h-4 sm:w-4"})})]}),(0,A.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4 mb-3 sm:mb-4",children:[(0,A.jsxs)("div",{children:[(0,A.jsx)("label",{className:"block text-xs sm:text-sm font-medium text-gray-700",children:"Field Label"}),(0,A.jsx)("input",{type:"text",className:"mt-1 block w-full px-2 py-1 sm:px-3 sm:py-2 border rounded-lg text-sm",value:e.label,onChange:e=>b(s,"label",e.target.value)})]}),(0,A.jsxs)("div",{children:[(0,A.jsx)("label",{className:"block text-xs sm:text-sm font-medium text-gray-700",children:"Field Type"}),(0,A.jsxs)("select",{className:"mt-1 block w-full px-2 py-1 sm:px-3 sm:py-2 border rounded-lg text-sm",value:e.type,onChange:e=>b(s,"type",e.target.value),children:[(0,A.jsx)("option",{value:"text",children:"Text"}),(0,A.jsx)("option",{value:"textarea",children:"Text Area"}),(0,A.jsx)("option",{value:"select",children:"Select"}),(0,A.jsx)("option",{value:"radio",children:"Radio"}),(0,A.jsx)("option",{value:"checkbox",children:"Checkbox"}),(0,A.jsx)("option",{value:"file",children:"File Upload"}),(0,A.jsx)("option",{value:"address",children:"Address"})]})]})]}),("select"===e.type||"radio"===e.type||"checkbox"===e.type)&&(0,A.jsxs)("div",{className:"mb-3 sm:mb-4",children:[(0,A.jsx)("label",{className:"block text-xs sm:text-sm font-medium text-gray-700 mb-2",children:"Options"}),(0,A.jsxs)("div",{className:"space-y-2",children:[(e.options||[]).map((t,a)=>(0,A.jsxs)("div",{className:"flex items-center gap-2",children:[(0,A.jsx)("input",{type:"text",className:"flex-1 px-2 py-1 sm:px-3 sm:py-2 border rounded-lg text-sm",value:t,onChange:t=>{const l=[...e.options];l[a]=t.target.value,b(s,"options",l)}}),(0,A.jsx)(N.$,{variant:"ghost",size:"sm",className:"text-red-600",onClick:()=>{const t=[...e.options];t.splice(a,1),b(s,"options",t)},children:(0,A.jsx)(y.A,{className:"h-3 w-3 sm:h-4 sm:w-4"})})]},a)),(0,A.jsxs)(N.$,{variant:"outline",size:"sm",className:"text-sm",onClick:()=>{const t=e.options||[];b(s,"options",[...t,`Option ${t.length+1}`])},children:[(0,A.jsx)(h.A,{className:"h-3 w-3 sm:h-4 sm:w-4 mr-2"})," Add Option"]})]})]}),(0,A.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-2 sm:gap-4",children:[(0,A.jsxs)("label",{className:"flex items-center gap-2",children:[(0,A.jsx)("input",{type:"checkbox",className:"rounded border-gray-300",checked:e.required,onChange:e=>b(s,"required",e.target.checked)}),(0,A.jsx)("span",{className:"text-xs sm:text-sm",children:"Required Field"})]}),"file"===e.type&&(0,A.jsxs)("label",{className:"flex items-center gap-2",children:[(0,A.jsx)("input",{type:"checkbox",className:"rounded border-gray-300",checked:e.multiple,onChange:e=>b(s,"multiple",e.target.checked)}),(0,A.jsx)("span",{className:"text-xs sm:text-sm",children:"Allow Multiple Files"})]})]})]},s))})]}
1),"pricing"===g&&(0,A.jsxs)("div",{className:"space-y-4 sm:space-y-6",children:[(0,A.jsxs)("div",{children:[(0,A.jsx)("h3",{className:"font-medium text-base sm:text-lg mb-4",children:"Quote Pricing"}),(0,A.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-6",children:[(0,A.jsxs)("div",{children:[(0,A.jsx)("label",{className:"block text-xs sm:text-sm font-medium text-gray-700",children:"Standard Quote Price"}),(0,A.jsxs)("div",{className:"mt-1 relative",children:[(0,A.jsx)("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-500",children:"$"}),(0,A.jsx)("input",{type:"number",className:"w-full pl-6 pr-3 py-1 sm:pl-7 sm:pr-4 sm:py-2 border rounded-lg text-sm",value:d.pricing.quotePrice.standard,onChange:e=>w("quotePrice","standard",parseFloat(e.target.value))})]})]}),(0,A.jsxs)("div",{children:[(0,A.jsx)("label",{className:"block text-xs sm:text-sm font-medium text-gray-700",children:"Emergency Quote Price"}),(0,A.jsxs)("div",{className:"mt-1 relative",children:[(0,A.jsx)("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-500",children:"$"}),(0,A.jsx)("input",{type:"number",className:"w-full pl-6 pr-3 py-1 sm:pl-7 sm:pr-4 sm:py-2 border rounded-lg text-sm",value:d.pricing.quotePrice.emergency,onChange:e=>w("quotePrice","emergency",parseFloat(e.target.value))})]})]})]})]}),(0,A.jsxs)("div",{children:[(0,A.jsx)("h3",{className:"font-medium text-base sm:text-lg mb-4",children:"Commission Rates"}),(0,A.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-6",children:[(0,A.jsxs)("div",{children:[(0,A.jsx)("label",{className:"block text-xs sm:text-sm font-medium text-gray-700",children:"Standard Commission Rate"}),(0,A.jsxs)("div",{className:"mt-1 relative",children:[(0,A.jsx)("input",{type:"text",className:"w-full pr-6 pl-3 py-1 sm:pr-8 sm:pl-4 sm:py-2 border rounded-lg text-sm",value:d.pricing.commission.standard.replace("%",""),onChange:e=>w("commission","standard",`${e.target.value}%`)}),(0,A.jsx)("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-500",children:"%"})]})]}),(0,A.jsxs)("div",{children:[(0,A.jsx)("label",{className:"block text-xs sm:text-sm font-medium text-gray-700",children:"Emergency Commission Rate"}),(0,A.jsxs)("div",{className:"mt-1 relative",children:[(0,A.jsx)("input",{type:"text",className:"w-full pr-6 pl-3 py-1 sm:pr-8 sm:pl-4 sm:py-2 border rounded-lg text-sm",value:d.pricing.commission.emergency.replace("%",""),onChange:e=>w("commission","emergency",`${e.target.value}%`)}),(0,A.jsx)("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-500",children:"%"})]})]})]})]}),(0,A.jsx)("div",{className:"bg-blue-50 p-3 sm:p-4 rounded-lg",children:(0,A.jsxs)("div",{className:"flex items-start gap-3",children:[(0,A.jsx)(r.A,{className:"h-4 w-4 sm:h-5 sm:w-5 text-blue-600 mt-0.5"}),(0,A.jsx)("div",{children:(0,A.jsx)("p",{className:"text-xs sm:text-sm text-blue-700",children:"These settings determine how much professionals pay to purchase this form and how much commission your platform receives from completed jobs."})})]})})]}),"settings"===g&&(0,A.jsx)("div",{className:"space-y-4 sm:space-y-6",children:(0,A.jsxs)("div",{children:[(0,A.jsx)("h3",{className:"font-medium text-base sm:text-lg mb-4",children:"Form Settings"}),(0,A.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:[(0,A.jsxs)("div",{className:"p-2 sm:p-3 bg-gray-50 rounded-lg",children:[(0,A.jsxs)("label",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-2",children:[(0,A.jsx)("span",{className:"text-xs sm:text-sm",children:"Auto-assign Professionals"}),(0,A.jsxs)("div",{className:"relative inline-flex items-center cursor-pointer",children:[(0,A.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:d.settings.autoAssign,onChange:e=>k("autoAssign",e.target.checked)}),(0,A.jsx)("div",{className:"w-9 h-5 sm:w-11 sm:h-6 bg-gray-200 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 sm:after:h-5 sm:after:w-5 after:transition-all peer-checked:bg-blue-600"})]})]}),(0,A.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Automatically assign professionals to customer requests"})]}),(0,A.jsxs)("div",{className:"p-2 sm:p-3 bg-gray-50 rounded-lg",children:[(0,A.jsxs)("label",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-2",children:[(0,A.jsx)("span",{className:"text-xs sm:text-sm",children:"Require Verification"}),(0,A.jsxs)("div",{className:"relative inline-flex items-center cursor-pointer",children:[(0,A.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:d.settings.requireVerification,onChange:e=>k("requireVerification",e.target.checked)}),(0,A.jsx)("div",{className:"w-9 h-5 sm:w-11 sm:h-6 bg-gray-200 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 sm:after:h-5 sm:after:w-5 after:transition-all peer-checked:bg-blue-600"})]})]}),(0,A.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Require professional verification before accepting"})]}),(0,A.jsxs)("div",{className:"p-2 sm:p-3 bg-gray-50 rounded-lg",children:[(0,A.jsxs)("label",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-2",children:[(0,A.jsx)("span",{className:"text-xs sm:text-sm",children:"Allow Multiple Quotes"}),(0,A.jsxs)("div",{className:"relative inline-flex items-center cursor-pointer",children:[(0,A.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:d.settings.allowMultipleQuotes,onChange:e=>k("allowMultipleQuotes",e.target.checked)}),(0,A.jsx)("div",{className:"w-9 h-5 sm:w-11 sm:h-6 bg-gray-200 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 sm:after:h-5 sm:after:w-5 after:transition-all peer-checked:bg-blue-600"})]})]}),(0,A.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Allow customers to receive multiple quotes"})]}),(0,A.jsxs)("div",{className:"p-2 sm:p-3 bg-gray-50 rounded-lg",children:[(0,A.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-2",children:[(0,A.jsx)("span",{className:"text-xs sm:text-sm",children:"Maximum Quotes"}),(0,A.jsx)("input",{type:"number",className:"w-16 sm:w-20 px-2 py-1 sm:px-3 sm:py-1 border rounded-lg text-sm",value:d.settings.maxQuotes,onChange:e=>k("maxQuotes",parseInt(e.target.value)),min:1,disabled:!d.settings.allowMultipleQuotes})]}),(0,A.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Maximum number of quotes per request"})]}),(0,A.jsxs)("div",{className:"p-2 sm:p-3 bg-gray-50 rounded-lg",children:[(0,A.jsxs)("label",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-2",children:[(0,A.jsx)("span",{className:"text-xs sm:text-sm",children:"Auto-Promote"}),(0,A.jsxs)("div",{className:"relative inline-flex items-center cursor-pointer",children:[(0,A.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:d.settings.autoPromote,onChange:e=>k("autoPromote",e.target.checked)}),(0,A.jsx)("div",{className:"w-9 h-5 sm:w-11 sm:h-6 bg-gray-200 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 sm:after:h-5 sm:after:w-5 after:transition-all peer-checked:bg-blue-600"})]})]}),(0,A.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Automatically promote to new professionals"})]}),(0,A.jsxs)("div",{className:"p-2 sm:p-3 bg-gray-50 rounded-lg",children:[(0,A.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-2",children:[(0,A.jsx)("span",{className:"text-xs sm:text-sm",children:"Promotion Count"}),(0,A.jsx)("input",{type:"number",className:"w-16 sm:w-20 px-2 py-1 sm:px-3 sm:py-1 border rounded-lg text-sm",value:d.settings.promotionCount,onChange:e=>k("promotionCount",parseInt(e.target.value)),min:0,disabled:!d.settings.autoPromote})]}),(0,A.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Number of forms to gift per professional"})]})]})]})})]}),(0,A.jsxs)("div",{className:"p-4 sm:p-6 border-t flex flex-col sm:flex-row justify-end gap-3",children:[(0,A.jsx)(N.$,{variant:"outline",onClick:t,className:"w-full sm:w-auto text-sm",children:"Cancel"}),(0,A.jsx)(N.$,{className:"w-full sm:w-auto text-sm",children:"Save Changes"})]})]})})},Se=[{id:1,name:"Plumbing",status:"active",source:"manual",formCount:3,lastSync:"2024-02-18 10:30 AM",region:"Canada"},{id:2,name:"Electrical",status:"active",source:"auto",formCount:2,lastSync:"2024-02-18 09:15 AM",region:"Canada"},{id:3,name:"Legal",status:"active",source:"manual",formCount:1,lastSync:"2024-02-16 11:45 AM",region:"Canada"}],Pe=[{id:"ca",name:"Canada",active:!0},{id:"us",name:"United States",active:!0},{id:"gb",name:"United Kingdom",active:!0},{id:"it",name:"Italy",active:!0},{id:"es",name:"Spain",active:!0}
1,{id:"au",name:"Australia",active:!1}],Fe=e=>{let s=e.isOpen,t=e.onClose,r=e.form;const i=(0,l.useState)(r?r.settings.promotionCount:0),n=(0,a.A)(i,2),c=n[0],m=n[1],o=(0,l.useState)(!!r&&r.settings.autoPromote),d=(0,a.A)(o,2),x=d[0],u=d[1],h=(0,l.useState)([{id:1,name:"John Smith",profession:"Plumber",region:"Toronto",registrationDate:"2024-02-15",status:"active"},{id:2,name:"Sarah Wilson",profession:"Electrician",region:"Vancouver",registrationDate:"2024-02-10",status:"active"},{id:3,name:"James Brown",profession:"Plumber",region:"Montreal",registrationDate:"2024-02-05",status:"active"}]),g=(0,a.A)(h,2),f=g[0];g[1];return s?(0,A.jsx)("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center p-2 sm:p-4",children:(0,A.jsxs)("div",{className:"bg-white rounded-lg w-full max-w-full sm:max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,A.jsx)("div",{className:"p-4 sm:p-6 border-b",children:(0,A.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Form Promotion Settings"})}),(0,A.jsxs)("div",{className:"p-4 sm:p-6 space-y-4 sm:space-y-6",children:[(0,A.jsx)("div",{className:"bg-blue-50 p-3 sm:p-4 rounded-lg",children:(0,A.jsxs)("div",{className:"flex items-start gap-2 sm:gap-3",children:[(0,A.jsx)(p.A,{className:"h-4 w-4 sm:h-5 sm:w-5 text-blue-600 mt-0.5"}),(0,A.jsxs)("div",{children:[(0,A.jsx)("h3",{className:"font-medium text-sm sm:text-base",children:"Form Auto-Promotion"}),(0,A.jsx)("p",{className:"text-xs sm:text-sm text-gray-700 mt-1",children:"Automatically gift this form to newly registered professionals in the matching category. This helps new professionals get started with the platform."})]})]})}),(0,A.jsxs)("div",{className:"space-y-4",children:[(0,A.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-2",children:[(0,A.jsxs)("label",{className:"flex items-center gap-2",children:[(0,A.jsx)("input",{type:"checkbox",className:"rounded border-gray-300",checked:x,onChange:e=>u(e.target.checked)}),(0,A.jsx)("span",{className:"font-medium text-sm sm:text-base",children:"Enable Auto-Promotion"})]}),(0,A.jsxs)("div",{className:"flex items-center gap-2 mt-2 sm:mt-0",children:[(0,A.jsx)("span",{className:"text-xs sm:text-sm text-gray-700",children:"Forms to gift:"}),(0,A.jsxs)("select",{className:"border rounded-lg p-1 sm:p-2 text-sm",value:c,onChange:e=>m(parseInt(e.target.value)),disabled:!x,children:[(0,A.jsx)("option",{value:"1",children:"1 Form"}),(0,A.jsx)("option",{value:"2",children:"2 Forms"}),(0,A.jsx)("option",{value:"3",children:"3 Forms"}),(0,A.jsx)("option",{value:"5",children:"5 Forms"}),(0,A.jsx)("option",{value:"10",children:"10 Forms"})]})]})]}),(0,A.jsxs)("div",{children:[(0,A.jsx)("h3",{className:"font-medium mb-2 text-sm sm:text-base",children:"Target Settings"}),(0,A.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:[(0,A.jsxs)("div",{children:[(0,A.jsx)("label",{className:"block text-xs sm:text-sm font-medium text-gray-700",children:"Professional Category"}),(0,A.jsxs)("select",{className:"mt-1 block w-full border rounded-lg p-1 sm:p-2 text-sm",children:[(0,A.jsx)("option",{value:"",children:"All Categories"}),(0,A.jsx)("option",{value:"plumber",children:"Plumbers"}),(0,A.jsx)("option",{value:"electrician",children:"Electricians"}),(0,A.jsx)("option",{value:"lawyer",children:"Lawyers"})]})]}),(0,A.jsxs)("div",{children:[(0,A.jsx)("label",{className:"block text-xs sm:text-sm font-medium text-gray-700",children:"Region"}),(0,A.jsxs)("select",{className:"mt-1 block w-full border rounded-lg p-1 sm:p-2 text-sm",children:[(0,A.jsx)("option",{value:"",children:"All Regions"}),(0,A.jsx)("option",{value:"toronto",children:"Toronto"}),(0,A.jsx)("option",{value:"vancouver",children:"Vancouver"}),(0,A.jsx)("option",{value:"montreal",children:"Montreal"})]})]})]})]})]}),(0,A.jsxs)("div",{children:[(0,A.jsx)("h3",{className:"font-medium mb-3 text-sm sm:text-base",children:"Manual Promotion"}),(0,A.jsx)("p",{className:"text-xs sm:text-sm text-gray-700 mb-3",children:"Select professionals to manually gift this form to:"}),(0,A.jsx)("div",{className:"border rounded-lg overflow-x-auto",children:(0,A.jsxs)("table",{className:"min-w-full divide-y divide-gray-200",children:[(0,A.jsx)("thead",{className:"bg-gray-50",children:(0,A.jsxs)("tr",{children:[(0,A.jsx)("th",{className:"px-2 py-2 sm:px-6 sm:py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:(0,A.jsx)("input",{type:"checkbox",className:"rounded border-gray-300"})}),(0,A.jsx)("th",{className:"px-2 py-2 sm:px-6 sm:py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Name"}),(0,A.jsx)("th",{className:"px-2 py-2 sm:px-6 sm:py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Profession"}),(0,A.jsx)("th",{className:"px-2 py-2 sm:px-6 sm:py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Region"}),(0,A.jsx)("th",{className:"px-2 py-2 sm:px-6 sm:py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Registration Date"})]})}),(0,A.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:f.map(e=>(0,A.jsxs)("tr",{children:[(0,A.jsx)("td",{className:"px-2 py-2 sm:px-6 sm:py-4 whitespace-nowrap",children:(0,A.jsx)("input",{type:"checkbox",className:"rounded border-gray-300"})}),(0,A.jsx)("td",{className:"px-2 py-2 sm:px-6 sm:py-4 whitespace-nowrap text-xs sm:text-sm font-medium text-gray-900",children:e.name}),(0,A.jsx)("td",{className:"px-2 py-2 sm:px-6 sm:py-4 whitespace-nowrap text-xs sm:text-sm text-gray-500",children:e.profession}),(0,A.jsx)("td",{className:"px-2 py-2 sm:px-6 sm:py-4 whitespace-nowrap text-xs sm:text-sm text-gray-500",children:e.region}),(0,A.jsx)("td",{className:"px-2 py-2 sm:px-6 sm:py-4 whitespace-nowrap text-xs sm:text-sm text-gray-500",children:e.registrationDate})]},e.id))})]})})]})]}),(0,A.jsxs)("div",{className:"p-4 sm:p-6 border-t flex flex-col sm:flex-row justify-end gap-3",children:[(0,A.jsx)(N.$,{variant:"outline",onClick:t,className:"w-full sm:w-auto text-sm",children:"Cancel"}),(0,A.jsx)(N.$,{className:"w-full sm:w-auto text-sm",children:"Save Settings"})]})]})}):null};return(0,A.jsxs)("div",{className:"min-h-screen bg-gray-50",style:{textAlign:"left"},children:[(0,A.jsx)(w.A,{}),(0,A.jsx)("main",{className:"lg:pl-64 pt-16",children:(0,A.jsx)("div",{className:"p-4 sm:p-6",children:(0,A.jsxs)("div",{className:"max-w-7xl mx-auto
1space-y-4 sm:space-y-6",children:[(0,A.jsxs)("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4",children:[(0,A.jsxs)("div",{children:[(0,A.jsx)("h1",{className:"text-xl sm:text-2xl font-bold text-gray-900",children:"Category Forms"}),(0,A.jsx)("p",{className:"text-sm sm:text-base text-gray-600 mt-1",children:"Manage service category forms and registrations"})]}),(0,A.jsx)("div",{className:"flex gap-2 w-full sm:w-auto",children:"forms"===t?(0,A.jsxs)(N.$,{className:"w-full sm:w-auto flex items-center gap-2 text-sm",onClick:()=>O(!0),children:[(0,A.jsx)(h.A,{className:"h-3 w-3 sm:h-4 sm:w-4"})," New Form"]}):(0,A.jsxs)(N.$,{className:"w-full sm:w-auto flex items-center gap-2 text-sm",children:[(0,A.jsx)(h.A,{className:"h-3 w-3 sm:h-4 sm:w-4"})," Add Category"]})})]}),(0,A.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-4 gap-4",children:[(0,A.jsx)(v.Zp,{className:"p-4 sm:p-6",children:(0,A.jsxs)("div",{className:"flex justify-between items-start",children:[(0,A.jsxs)("div",{children:[(0,A.jsx)("p",{className:"text-xs sm:text-sm text-gray-500",children:"Total Forms"}),(0,A.jsx)("p",{className:"text-lg sm:text-2xl font-semibold mt-1",children:"12"})]}),(0,A.jsx)("div",{className:"p-2 bg-blue-100 rounded-lg",children:(0,A.jsx)(n.A,{className:"h-4 w-4 sm:h-5 sm:w-5 text-blue-600"})})]})}),(0,A.jsx)(v.Zp,{className:"p-4 sm:p-6",children:(0,A.jsxs)("div",{className:"flex justify-between items-start",children:[(0,A.jsxs)("div",{children:[(0,A.jsx)("p",{className:"text-xs sm:text-sm text-gray-500",children:"Categories"}),(0,A.jsx)("p",{className:"text-lg sm:text-2xl font-semibold mt-1",children:"8"})]}),(0,A.jsx)("div",{className:"p-2 bg-green-100 rounded-lg",children:(0,A.jsx)(i.A,{className:"h-4 w-4 sm:h-5 sm:w-5 text-green-600"})})]})}),(0,A.jsx)(v.Zp,{className:"p-4 sm:p-6",children:(0,A.jsxs)("div",{className:"flex justify-between items-start",children:[(0,A.jsxs)("div",{children:[(0,A.jsx)("p",{className:"text-xs sm:text-sm text-gray-500",children:"Auto-synced"}),(0,A.jsx)("p",{className:"text-lg sm:text-2xl font-semibold mt-1",children:"5"})]}),(0,A.jsx)("div",{className:"p-2 bg-purple-100 rounded-lg",children:(0,A.jsx)(u.A,{className:"h-4 w-4 sm:h-5 sm:w-5 text-purple-600"})})]})}),(0,A.jsx)(v.Zp,{className:"p-4 sm:p-6",children:(0,A.jsxs)("div",{className:"flex justify-between items-start",children:[(0,A.jsxs)("div",{children:[(0,A.jsx)("p",{className:"text-xs sm:text-sm text-gray-500",children:"Submissions"}),(0,A.jsx)("p",{className:"text-lg sm:text-2xl font-semibold mt-1",children:"1.2k"})]}),(0,A.jsx)("div",{className:"p-2 bg-yellow-100 rounded-lg",children:(0,A.jsx)(x.A,{className:"h-4 w-4 sm:h-5 sm:w-5 text-yellow-600"})})]})})]}),(0,A.jsxs)("div",{className:"flex gap-2 border-b overflow-x-auto snap-x pb-2",children:[(0,A.jsx)(S,{active:"promotions"===t,label:"Promotions",icon:p.A,onClick:()=>P("promotions")}),(0,A.jsx)(S,{active:"settings"===t,label:"Settings",icon:f.A,onClick:()=>P("settings")}),(0,A.jsx)(S,{active:"users"===t,label:"User Permissions",icon:b.A,onClick:()=>P("users")})]}),(0,A.jsx)("div",{className:"flex flex-col gap-4",children:(0,A.jsxs)("div",{className:"flex flex-col sm:flex-row justify-between gap-2 sm:gap-4",children:[(0,A.jsx)("div",{className:"flex flex-col sm:flex-row gap-2 sm:gap-4 flex-1",children:(0,A.jsxs)("div",{className:"relative flex-1",children:[(0,A.jsx)(g.A,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 sm:h-5 sm:w-5 text-gray-400"}),(0,A.jsx)("input",{type:"text",placeholder:`Search ${t}...`,value:R,onChange:e=>$(e.target.value),className:"w-full pl-8 pr-4 py-1 sm:pl-10 sm:py-2 border rounded-lg text-sm"})]})}),"forms"===t&&(0,A.jsxs)("select",{value:E,onChange:e=>Q(e.target.value),className:"w-full sm:w-auto px-2 py-1 sm:px-4 sm:py-2 border rounded-lg text-sm",children:[(0,A.jsx)("option",{value:"all",children:"All Categories"}),(0,A.jsx)("option",{value:"plumbing",children:"Plumbing"}),(0,A.jsx)("option",{value:"electrical",children:"Electrical"}),(0,A.jsx)("option",{value:"legal",children:"Legal"})]})]})}
1),(0,A.jsxs)("div",{className:"space-y-4 sm:space-y-6",children:["forms"===t&&(0,A.jsx)(k.Np,{forms:[{id:1,name:"Plumbing Service Request",category:"Plumbing",type:"quote",status:"active",lastModified:"2024-02-18",region:"Canada",fields:[{id:"service_type",label:"Service Type",type:"select",required:!0,options:["Emergency Repair","Installation","Maintenance"]},{id:"description",label:"Problem Description",type:"textarea",required:!0},{id:"location",label:"Service Location",type:"address",required:!0},{id:"timeline",label:"Preferred Timeline",type:"radio",options:["Emergency (ASAP)","Within 24 hours","Within a week"]},{id:"photos",label:"Photos of the Issue",type:"file",multiple:!0,accept:"image/*"}],pricing:{quotePrice:{standard:10,emergency:25},commission:{standard:"10%",emergency:"15%"}},settings:{autoAssign:!0,requireVerification:!0,allowMultipleQuotes:!0,maxQuotes:5,autoPromote:!1,promotionCount:0},stats:{submissions:245,conversionRate:"68%",avgResponseTime:"2.5 hours",purchasedCount:142,hiredCount:56}},{id:2,name:"Emergency Electrical Service",category:"Electrical",type:"emergency",status:"active",lastModified:"2024-02-17",region:"Canada",fields:[{id:"emergency_type",label:"Emergency Type",type:"select",required:!0,options:["Power Outage","Electrical Fire Risk","Circuit Issues"]},{id:"safety_status",label:"Safety Status",type:"radio",required:!0,options:["Safe Area","Potentially Dangerous","Immediate Danger"]}],pricing:{quotePrice:{standard:15,emergency:35},commission:{standard:"12%",emergency:"20%"}},settings:{autoAssign:!0,requireVerification:!0,allowMultipleQuotes:!1,maxQuotes:1,autoPromote:!0,promotionCount:1},stats:{submissions:128,conversionRate:"82%",avgResponseTime:"35 minutes",purchasedCount:94,hiredCount:24}},{id:3,name:"Legal Consultation Request",category:"Legal",type:"quote",status:"active",lastModified:"2024-02-16",region:"Canada",fields:[{id:"legal_area",label:"Area of Law",type:"select",required:!0,options:["Family Law","Real Estate","Corporate","Immigration","Criminal Defense"]},{id:"description",label:"Brief Description of Legal Issue",type:"textarea",required:!0}],pricing:{quotePrice:{standard:18,emergency:40},commission:{standard:"15%",emergency:"22%"}},settings:{autoAssign:!1,requireVerification:!0,allowMultipleQuotes:!0,maxQuotes:3,autoPromote:!0,promotionCount:2},stats:{submissions:95,conversionRate:"65%",avgResponseTime:"4.5 hours",purchasedCount:62,hiredCount:35}}],selectedCategory:E,searchQuery:R,onShowAddModal:()=>O(!0),onShowFormEditor:e=>{H(e),_(!0)},onShowPromotionModal:e=>{H(e),te(!0)}}),"categories"===t&&(0,A.jsx)(k.U1,{syncedCategories:Se,autoSync:G,searchQuery:R,onToggleAutoSync:()=>X(!G)}),"users"===t&&(0,A.jsx)(C.m,{showHeader:!0,showActions:!0,showFilters:!0}),"promotions"===t&&(0,A.jsx)(k.US,{syncedCategories:Se,regions:Pe,promotionCount:me,onPromotionCountChange:oe}),"settings"===t&&(0,A.jsx)(k.fW,{})]}),L&&(0,A.jsx)("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center p-2 sm:p-4",children:(0,A.jsxs)("div",{className:"bg-white rounded-lg w-full max-w-full sm:max-w-4xl max-h-[90vh] overflow-y-auto",children:[(0,A.jsx)("div",{className:"p-4 sm:p-6 border-b sticky top-0 bg-white z-10",children:(0,A.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Create New Form"})}),(0,A.jsxs)("div",{className:"p-4 sm:p-6 space-y-4 sm:space-y-6",children:[(0,A.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-6",children:[(0,A.jsxs)("div",{children:[(0,A.jsx)("label",{className:"block text-xs sm:text-sm font-medium text-gray-700",children:"Form Name"}),(0,A.jsx)("input",{type:"text",className:"mt-1 block w-full px-2 py-1 sm:px-3 sm:py-2 border rounded-lg text-sm",placeholder:"Enter form name"})]}),(0,A.jsxs)("div",{children:[(0,A.jsx)("label",{className:"block text-xs sm:text-sm font-medium text-gray-700",children:"Category"}),(0,A.jsxs)("select",{className:"mt-1 block w-full px-2 py-1 sm:px-3 sm:py-2 border rounded-lg text-sm",children:[(0,A.jsx)("option",{value:"",children:"Select a category"}),Se.map(e=>(0,A.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,A.jsxs)("div",{children:[(0,A.jsx)("label",{className:"block text-xs sm:text-sm font-medium text-gray-700",children:"Form Type"}),(0,A.jsxs)("select",{className:"mt-1 block w-full px-2 py-1 sm:px-3 sm:py-2 border rounded-lg text-sm",children:[(0,A.jsx)("option",{value:"quote",children:"Quote Request"}),(0,A.jsx)("option",{value:"emergency",children:"Emergency Service"})]})]}),(0,A.jsxs)("div",{children:[(0,A.jsx)("label",{className:"block text-xs sm:text-sm font-medium text-gray-700",children:"Region"}),(0,A.jsxs)("select",{className:"mt-1 block w-full px-2 py-1 sm:px-3 sm:py-2 border rounded-lg text-sm",children:[(0,A.jsx)("option",{value:"",children:"Select a regi
1on"}),Pe.map(e=>(0,A.jsx)("option",{value:e.name,children:e.name},e.id))]})]})]}),(0,A.jsxs)("div",{children:[(0,A.jsx)("label",{className:"block text-xs sm:text-sm font-medium text-gray-700 mb-2",children:"Form Fields"}),(0,A.jsxs)("div",{className:"space-y-3",children:[(0,A.jsxs)("div",{className:"p-2 sm:p-4 border rounded-lg",children:[(0,A.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-2 mb-3",children:[(0,A.jsx)("input",{type:"text",className:"w-full sm:w-auto px-2 py-1 sm:px-3 sm:py-2 border rounded-lg text-sm",placeholder:"Field Label",defaultValue:"Service Type"}),(0,A.jsxs)("select",{className:"w-full sm:w-auto px-2 py-1 sm:px-3 sm:py-2 border rounded-lg text-sm",children:[(0,A.jsx)("option",{value:"select",children:"Select"}),(0,A.jsx)("option",{value:"text",children:"Text"}),(0,A.jsx)("option",{value:"textarea",children:"Text Area"}),(0,A.jsx)("option",{value:"radio",children:"Radio"}),(0,A.jsx)("option",{value:"checkbox",children:"Checkbox"}),(0,A.jsx)("option",{value:"file",children:"File Upload"})]})]}),(0,A.jsxs)("div",{className:"flex items-center justify-between",children:[(0,A.jsxs)("label",{className:"flex items-center gap-2",children:[(0,A.jsx)("input",{type:"checkbox",className:"rounded",defaultChecked:!0}),(0,A.jsx)("input",{type:"checkbox",className:"rounded",defaultChecked:!0}),(0,A.jsx)("span",{className:"text-xs sm:text-sm",children:"Required Field"})]}),(0,A.jsx)(N.$,{variant:"ghost",size:"sm",className:"text-red-600",children:(0,A.jsx)(j.A,{className:"h-3 w-3 sm:h-4 sm:w-4"})})]})]}),(0,A.jsxs)("div",{className:"p-2 sm:p-4 border rounded-lg",children:[(0,A.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-2 mb-3",children:[(0,A.jsx)("input",{type:"text",className:"w-full sm:w-auto px-2 py-1 sm:px-3 sm:py-2 border rounded-lg text-sm",placeholder:"Field Label",defaultValue:"Description"}),(0,A.jsxs)("select",{className:"w-full sm:w-auto px-2 py-1 sm:px-3 sm:py-2 border rounded-lg text-sm",children:[(0,A.jsx)("option",{value:"textarea",children:"Text Area"}),(0,A.jsx)("option",{value:"text",children:"Text"}),(0,A.jsx)("option",{value:"select",children:"Select"}),(0,A.jsx)("option",{value:"radio",children:"Radio"}),(0,A.jsx)("option",{value:"checkbox",children:"Checkbox"}),(0,A.jsx)("option",{value:"file",children:"File Upload"})]})]}),(0,A.jsxs)("div",{className:"flex items-center justify-between",children:[(0,A.jsxs)("label",{className:"flex items-center gap-2",children:[(0,A.jsx)("input",{type:"checkbox",className:"rounded",defaultChecked:!0}),(0,A.jsx)("span",{className:"text-xs sm:text-sm",children:"Required Field"})]}),(0,A.jsx)(N.$,{variant:"ghost",size:"sm",className:"text-red-600",children:(0,A.jsx)(j.A,{className:"h-3 w-3 sm:h-4 sm:w-4"})})]})]}),(0,A.jsxs)(N.$,{variant:"outline",className:"w-full flex items-center gap-2 text-sm",onClick:()=>{},children:[(0,A.jsx)(h.A,{className:"h-3 w-3 sm:h-4 sm:w-4"})," Add Field"]})]})]}),(0,A.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-6",children:[(0,A.jsxs)("div",{children:[(0,A.jsx)("h3",{className:"font-medium mb-3 text-sm sm:text-base",children:"Pricing"}),(0,A.jsxs)("div",{className:"space-y-3",children:[(0,A.jsxs)("div",{children:[(0,A.jsx)("label",{className:"block text-xs sm:text-sm text-gray-700",children:"Standard Quote Price"}),(0,A.jsxs)("div",{className:"mt-1 relative",children:[(0,A.jsx)("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-500",children:"$"}),(0,A.jsx)("input",{type:"number",className:"w-full pl-6 pr-3 py-1 sm:pl-7 sm:pr-4 sm:py-2 border rounded-lg text-sm",defaultValue:10})]})]}),(0,A.jsxs)("div",{children:[(0,A.jsx)("label",{className:"block text-xs sm:text-sm text-gray-700",children:"Emergency Quote Price"}),(0,A.jsxs)("div",{className:"mt-1 relative",children:[(0,A.jsx)("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-500",children:"$"}),(0,A.jsx)("input",{type:"number",className:"w-full pl-6 pr-3 py-1 sm:pl-7 sm:pr-4 sm:py-2 border rounded-lg text-sm",defaultValue:25})]})]})]})]}),(0,A.jsxs)("div",{children:[(0,A.jsx)("h3",{className:"font-medium mb-3 text-sm sm:text-base",children:"Commission"}),(0,A.jsxs)("div",{className:"space-y-3",children:[(0,A.jsxs)("div",{children:[(0,A.jsx)("label",{className:"block text-xs sm:text-sm text-gray-700",children:"Standard Commission"}),(0,A.jsxs)("div",{className:"mt-1 relative",children:[(0,A.jsx)("input",{type:"number",className:"w-full pr-6 pl-3 py-1 sm:pr-8 sm:pl-4 sm:py-2 border rounded-lg text-sm",defaultValue:10}),(0,A.jsx)("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-500",children:"%"})]})]}),(0,A.jsxs)("div",{children:[(0,A.jsx)("label",{className:"block text-xs sm:text-sm text-gray-700",children:"Emergency Commission"}),(0,A.jsxs)("div",{className:"mt-1 relative",children:[(0,A.jsx)("input",{type:"number",className:"w-full pr-6 pl-3 py-1 sm:pr-8 sm:pl-4 sm:py-2 border rounded-lg text-sm",defaultValue:15}),(0,A.jsx)("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-500",children:"%"})]})]})]})]})]}),(0,A.jsxs)("div",{children:[(0,A.jsx)("h3",{className:"font-medium mb-3 text-sm sm:text-base",children:"Form Settings"}),(0,A.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:[(0,A.jsxs)("label",{className:"flex items-center gap-2 text-xs sm:text-sm",children:[(0,A.jsx)("input",{type:"checkbox",className:"rounded",defaultChecked:!0}),(0,A.jsx)("span",{children:"Auto-assign Professionals"})]}),(0,A.jsxs)("label",{className:"flex items-center gap-2 text-xs sm:text-sm",children:[(0,A.jsx)("input",{type:"checkbox",className:"rounded",defaultChecked:!0}),(0,A.jsx)("span",{children:"Require Verification"})]}),(0,A.jsxs)("label",{className:"flex items-center gap-2 text-xs sm:text-sm",children:[(0,A.jsx)("input",{type:"checkbox",className:"rounded",defaultChecked:!0}),(0,A.jsx)("span",{children:"Allow Multiple Quotes"})]}),(0,A.jsxs)("div",{className:"flex items-center gap-2",children:[(0,A.jsx)("span",{className:"text-xs sm:text-sm",children:"Max Quotes:"}),(0,A.jsx)("input",{type:"number",className:"w-16 sm:w-20 px-2 py-1 sm:px-3 sm:py-1 border rounded-lg text-sm",defaultValue:5,min:1})]})]})]})]}),(0,A.jsxs)("div",{className:"p-4 sm:p-6 border-t flex flex-col sm:flex-row justify-end gap-3",children:[(0,A.jsx)(N.$,{variant:"outline",onClick:()=>O(!1),className:"w-full sm:w-auto text-sm",children:"Cancel"}),(0,A.jsx)(N.$,{className:"w-full sm:w-auto text-sm",children:"Create Form"})]})]})}),U&&B&&(0,A.jsx)(Ae,{isOpen:U,onClose:()=>{_(!1),H(null)},form:B}),se&&(0,A.jsx)(Fe,{isOpen:se,onClose:()=>te(!1),form:B}),he&&we&&(0,A.jsx)(ke,{isOpen:he,onClose:()=>ge(!1),user:we}),be&&we&&(0,A.jsx)(Ce,{isOpen:be,onClose:()=>ye(!1),user:we})]})})})]})};t.d(s,["default",0,P])}}]);
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.