PageSourceSearch

https://buildslot.ai/assets/PostJobRequest-DSgY1QHG.js

js buildslot.ai collected 2026-10-05 12:12:43 UTC 22,751 bytes, 1 lines download raw bytes

vendor: 6,164 bytes, line 1
1import{r as m,ad as K,af as fe,m as e,ag as ve,ah as je,ai as be,ak as W,Y as Z,an as R,am as X,aF as Q,ao as Ne,ar as ye,at as we,au as Ce,as as _e,av as Pe,aw as Se,ax as Ae,ay as Re,A as Fe,s as ke,L as F,n as k,B as j,p as ee,w as L,D as ae,x as E,y as Oe,v as Ie,I as Me,X as Ee,G as De,C as Te}from"./index-CpSGH3si.js";import{I as g}from"./input-CJQwYE0h.js";import{T as Le}from"./textarea-DnsCXU4p.js";import{L as h}from"./label-mxM2ZpWz.js";import{C,b as _,a as P,c as O}from"./card--3jAFIY6.js";import{S as B,a as J,b as $,c as H,d as z}from"./select-DF7dIvp6.js";import{C as Be}from"./calendar-DenphN4x.js";import{L as Je}from"./Logo-DmRSeVwj.js";import{S as G}from"./skeleton-D7CKVNpx.js";import{g as $e}from"./AIMatchingService-7xGEI2cb.js";import{S as U}from"./sparkles-Dcvw6KO-.js";import{Z as se}from"./zap-DMV_c2aX.js";import{C as te}from"./circle-check-big-BfTSBK82.js";import{m as w}from"./proxy-DFy_m_5J.js";import{S as He}from"./shield-DdxYJIuW.js";import{A as ze}from"./arrow-right-wWO7VtP3.js";import{A as Ge}from"./arrow-left-BWOwnNcQ.js";import{A as Ue}from"./index-CtsrXVb9.js";import{L as V}from"./loader-circle-CZ4nBqpt.js";import{I as Ve}from"./image-DhDYYEir.js";import{a as Y}from"./format-DRR4LvZs.js";import"./index-BdQq_4o_.js";import"./index-Bs3UMnWC.js";import"./index-Cy91vPlr.js";import"./chevron-up-xOaegNmi.js";import"./differenceInCalendarDays-CFJcUmo7.js";import"./addMonths-Dda1PylI.js";import"./isSameMonth-BJzWQGR2.js";import"./isBefore-DbbOBjMf.js";import"./isSameDay-CnIkoyse.js";import"./subDays-D-snu2mw.js";import"./addDays-DbcpP0x6.js";import"./setYear-CliJVh3o.js";import"./endOfWeek-CxH9v-Wb.js";import"./startOfMonth-DfJskKPr.js";import"./addWeeks-DCzH6OaQ.js";import"./isAfter-X1VCSQ-p.js";import"./chevron-left-Bt8IqULh.js";var M="Popover",[re]=je(M,[K]),I=K(),[Ye,b]=re(M),oe=s=>{const{__scopePopover:l,children:o,open:n,defaultOpen:a,onOpenChange:r,modal:i=!1}=s,c=I(l),x=m.useRef(null),[d,f]=m.useState(!1),[v,p]=fe({prop:n,defaultProp:a??!1,onChange:r,caller:M});return e.jsx(ve,{...c,children:e.jsx(Ye,{scope:l,contentId:be(),triggerRef:x,open:v,onOpenChange:p,onOpenToggle:m.useCallback(()=>p(N=>!N),[p]),hasCustomAnchor:d,onCustomAnchorAdd:m.useCallback(()=>f(!0),[]),onCustomAnchorRemove:m.useCallback(()=>f(!1),[]),modal:i,children:o})})};oe.displayName=M;var le="PopoverAnchor",qe=m.forwardRef((s,l)=>{const{__scopePopover:o,...n}=s,a=b(le,o),r=I(o),{onCustomAnchorAdd:i,onCustomAnchorRemove:c}=a;return m.useEffect(()=>(i(),()=>c()),[i,c]),e.jsx(X,{...r,...n,ref:l})});qe.displayName=le;var ne="PopoverTrigger",ie=m.forwardRef((s,l)=>{const{__scopePopover:o,...n}=s,a=b(ne,o),r=I(o),i=W(l,a.triggerRef),c=e.jsx(Z.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":he(a.open),...n,ref:i,onClick:R(s.onClick,a.onOpenToggle)});return a.hasCustomAnchor?c:e.jsx(X,{asChild:!0,...r,children:c})});ie.displayName=ne;var D="PopoverPortal",[Ke,We]=re(D,{forceMount:void 0}),ce=s=>{const{__scopePopover:l,forceMount:o,children:n,container:a}=s,r=b(D,l);return e.jsx(Ke,{scope:l,forceMount:o,children:e.jsx(Q,{present:o||r.open,children:e.jsx(Ne,{asChild:!0,container:a,children:n})})})};ce.displayName=D;var S="PopoverContent",de=m.forwardRef((s,l)=>{const o=We(S,s.__scopePopover),{forceMount:n=o.forceMount,...a}=s,r=b(S,s.__scopePopover);return e.jsx(Q,{present:n||r.open,children:r.modal?e.jsx(Xe,{...a,ref:l}):e.jsx(Qe,{...a,ref:l})})});de.displayName=S;var Ze=Ce("PopoverContent.RemoveScroll"),Xe=m.forwardRef((s,l)=>{const o=b(S,s.__scopePopover),n=m.useRef(null),a=W(l,n),r=m.useRef(!1);return m.useEffect(()=>{const i=n.current;if(i)return ye(i)},[]),e.jsx(we,{as:Ze,allowPinchZoom:!0,children:e.jsx(me,{...s,ref:a,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(s.onCloseAutoFocus,i=>{var c;i.preventDefault(),r.current||(c=o.triggerRef.current)==null||c.focus()}),onPointerDownOutside:R(s.onPointerDownOutside,i=>{const c=i.detail.originalEvent,x=c.button===0&&c.ctrlKey===!0,d=c.button===2||x;r.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:R(s.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Qe=m.forwardRef((s,l)=>{const o=b(S,s.__scopePopover),n=m.useRef(!1),a=m.useRef(!1);return e.jsx(me,{...s,ref:l,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{var i,c;(i=s.onCloseAutoFocus)==null||i.call(s,r),r.defaultPrevented||(n.current||(c=o.triggerRef.current)==null||c.focus(),r.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:r=>{var x,d;(x=s.onInteractOutside)==null||x.call(s,r),r.defaultPrevented||(n.current=!0,r.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const i=r.target;((d=o.triggerRef.current)==null?void 0:d.contains(i))&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&a.current&&r.preventDefault()}})}),me=m.forwardRef((s,l)=>{const{__scopePopover:o,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:r,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:x,onFocusOutside:d,onInteractOutside:f,...v}=s,p=b(S,o),N=I(o);return _e(),e.jsx(Pe,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:r,children:e.jsx(Se,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:c,onPointerDownOutside:x,onFocusOutside:d,onDismiss:()=>p.onOpenChange(!1),children:e.jsx(Ae,{"data-state":he(p.open),role:"dialog",id:p.contentId,...N,...v,ref:l,style:{...v.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),xe="PopoverClose",ea=m.forwardRef((s,l)=>{const{__scopePopover:o,...n}=s,a=b(xe,o);return e.jsx(Z.button,{type:"button",...n,ref:l,onClick:R(s.onClick,()=>a.onOpenChange(!1))})});ea.displayName=xe;var aa="PopoverArrow",sa=m.forwardRef((s,l)=>{const{__scopePopover:o,...n}=s,a=I(o);return e.jsx(Re,{...a,...n,ref:l})});
1sa.displayName=aa;function he(s){return s?"open":"closed"}var ta=oe,ra=ie,oa=ce,pe=de;const la=ta,na=ra,ue=m.forwardRef(({className:s,align:l="center",sideOffset:o=4,...n},a)=>e.jsx(oa,{children:e.jsx(pe,{ref:a,align:l,sideOffset:o,className:Fe("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...n})}));ue.displayName=pe.displayName;const ia={excellent:{bg:"bg-green-100",text:"text-green-700",icon:ee},good:{bg:"bg-blue-100",text:"text-blue-700",icon:te},fair:{bg:"bg-amber-100",text:"text-amber-700",icon:se},low:{bg:"bg-slate-100",text:"text-slate-600",icon:null}};function ca({jobRequest:s}){const[l,o]=m.useState([]),{data:n,isLoading:a}=ke({queryKey:["contractors-for-matching"],queryFn:()=>E.entities.Contractor.list("-rating",100),enabled:!!s});return m.useEffect(()=>{n&&s&&$e(s,n).then(o).catch(()=>o([]))},[n,s]),a?e.jsxs(C,{children:[e.jsx(_,{children:e.jsx(G,{className:"h-6 w-56"})}),e.jsx(P,{children:e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:[...Array(3)].map((r,i)=>e.jsx(G,{className:"h-48 rounded-xl"},i))})})]}):!l||l.length===0?e.jsxs(C,{children:[e.jsx(_,{children:e.jsxs(O,{className:"flex items-center gap-2 text-lg",children:[e.jsx(U,{className:"w-5 h-5 text-purple-600"}),"AI-Recommended Contractors"]})}),e.jsx(P,{children:e.jsxs("div",{className:"text-center py-8 text-slate-500",children:[e.jsx(se,{className:"w-12 h-12 text-slate-300 mx-auto mb-3"}),e.jsx("p",{children:"No matching contractors found for this job."}),e.jsx("p",{className:"text-sm mt-1",children:"Try browsing all contractors instead."}),e.jsx(F,{to:k("Search"),children:e.jsx(j,{variant:"outline",className:"mt-4",children:"Browse Contractors"})})]})})]}):e.jsxs(C,{children:[e.jsxs(_,{children:[e.jsxs(O,{className:"flex items-center gap-2 text-lg",children:[e.jsx(U,{className:"w-5 h-5 text-purple-600"}),"Top Matching Contractors for Your Job"]}),e.jsx("p",{className:"text-sm text-slate-500",children:"AI-powered recommendations based on your job requirements"})]}),e.jsx(P,{children:e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:l.map((r,i)=>{var d,f;const c=ia[r.aiMatch.matchLevel],x=c.icon;return e.jsxs(w.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:i*.1},className:"border border-slate-200 rounded-xl overflow-hidden hover:border-purple-300 hover:shadow-lg transition-all",children:[e.jsxs("div",{className:`${c.bg} px-4 py-2 flex items-center justify-between`,children:[e.jsxs("span",{className:`font-semibold ${c.text} flex items-center gap-1.5`,children:[x&&e.jsx(x,{className:"w-4 h-4"}),r.aiMatch.score,"% Match"]}),e.jsx(L,{variant:"outline",className:`${c.text} border-current`,children:r.aiMatch.matchLevel})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[e.jsx("div",{className:"w-12 h-12 rounded-lg bg-slate-100 flex items-center justify-center overflow-hidden",children:r.profile_image?e.jsx("img",{src:r.profile_image,alt:"",className:"w-full h-full object-cover"}):e.jsx("span",{className:"text-xl font-bold text-slate-400",children:(d=r.business_name)==null?void 0:d.charAt(0)})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h4",{className:"font-semibold text-slate-900 truncate",children:r.business_name}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-500",children:[e.jsx(ae,{className:"w-3.5 h-3.5"}),r.location_city,", ",r.location_state]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[r.rating&&e.jsxs("div",{className:"flex items-center gap-1 bg-amber-50 px-2 py-1 rounded",children:[e.jsx(ee,{className:"w-3.5 h-3.5 text-amber-500 fill-amber-500"}),e.jsx("span",{className:"text-sm font-medium",children:r.rating.toFixed(1)})]}),r.is_verified&&e.jsxs(L,{variant:"outline",className:"text-green-600 border-green-200",children:[e.jsx(He,{className:"w-3 h-3 mr-1"}),"Verified"]})]}),((f=r.aiMatch.factors)==null?void 0:f.length)>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("p",{className:"text-xs text-slate-500 mb-1.5",children:"Why they match:"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:r.aiMatch.factors.slice(0,3).map((v,p)=>e.jsx("span",{className:"text-xs bg-purple-50 text-purple-700 px-2 py-0.5 rounded-full",children:v.factor},p))})]}),e.jsx(F,{to:k(`ContractorProfile?id=${r.id}`),children:e.jsxs(j,{className:"w-full bg-purple-600 hover:bg-purple-700",children:["View Profile",e.jsx(ze,{className:"w-4 h-4 ml-2"})]})})]})]},r.id)})})})]})}const q=[{value:"general_contractor",label:"General Contractor"},{value:"electrical",label:"Electrical"},{value:"plumbing",label:"Plumbing"},{value:"hvac",label:"HVAC"},{value:"roofing",label:"Roofing"},{value:"framing",label:"Framing"},{value:"drywall",label:"Drywall"},{value:"painting",label:"Painting"},{value:"flooring",label:"Flooring"},{value:"concrete",label:"Concrete / Flatwork"},{value:"landscaping",label:"Landscaping"},{value:"fencing",label:"Fencing"},{value:"siding",label:"Siding"},{value:"kitchen_remodel",label:"Kitchen Remodel"},{value:"bathroom_remodel",label:"Bathroom Remodel"},{value:"deck_patio",label:"Deck / Patio"},{value:"handyman",label:"Handyman Services"},{value:"other",label:"Other"}],da=[{value:"asap",label:"As soon as possible"},{value:"within_week",label:"Within a week"},{value:"within_2_weeks",label:"Within 2 weeks"},{value:"within_month",label:"Within a month"},{value:"flexible",label:"I'm flexible"}];function Ka(){var T;Oe();const[s,l]=m.useState(1),[o,n]=m.useState(!1),[a,r]=m.useState({title:"",description:"",trade:"",location_address:"",location_city:"",location_state:"",location_zip:"",budget_min:"",budget_max:"",preferred_date:null,flexibility:"flexible",images:[],homeowner_name:"",homeowner_email:"",homeowner_phone:""}),[i,c]=m.useState(null),x=Ie({mutationFn:t=>E.entities.JobRequest.create(t),onSuccess:t=>{c(t),l(4)}}),d=(t,u)=>{r(A=>({...A,[t]:u}))},f=async t=>{const u=Array.from(t.target.files);if(u.length===0)return;n(!0);const A=[];for(const y of u){const{file_url:ge}=await E.integrations.Core.UploadFile({file:y});A.push(ge)}r(y=>({...y,images:[...y.images,...A]})),n(!1)},v=t=>{r(u=>({...u,images:u.images.filter((A,y)=>y!==t)}))},p=()=>{const t={...a,budget_min:a.budget_min?Number(a.budget_min):void 0,budget_max:a.budget_max?Number(a.budget_max):void 0,preferred_date:a.preferred_date?Y(a.preferred_date,"yyyy-MM-dd"):void 0,status:"open"};x.mutate(t)},N=()=>s===1?a.title&&a.description&&a.trade:s===2?a.location_city&&a.location_state:s===3?a.homeowner_name&&a.homeowner_email:!0;return e.jsxs("div",{className:"min-h-screen bg-slate-50",children:[e.jsx("div",{className:"bg-white border-b border-slate-200 sticky top-0 z-30",children:e.jsx("div",{className:"max-w-3xl mx-auto px-4 py-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(F,{to:k("Home"),className:"flex items-center gap-2 text-slate-600 hover:text-slate-900",children:[e.jsx(Ge,{className:"w-5 h-5"}),e.jsx("span",{className:"hidden sm:inline",children:"Back"})]}),e.jsx(Je,{size:"sm"}),e.jsx("div",{className:"w-20"})]})})}),e.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-8",children:[s<4&&e.jsxs("div",{className:"mb-8",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("span",{className:"text-sm text-slate-500",children:["Step ",s," of 3"]}),e.jsxs("span",{className:"text-sm text-slate-500",children:[s===1&&"Job Details",s===2&&"Location & Budget",s===3&&"Contact Info"]})]}),e.jsx("div",{className:"h-2 bg-slate-200 rounded-full overflow-hidden",children:e.jsx(w.div,{className:"h-full bg-green-600 rounded-full",initial:{width:0},animate:{width:`${s/3*100}%`}})})]}),e.jsxs(Ue,{mode:"wait",children:[s===1&&e.jsx(w.div,{initial:{opacity:0,x:20}
1,animate:{opacity:1,x:0},exit:{opacity:0,x:-20},children:e.jsxs(C,{children:[e.jsx(_,{children:e.jsxs(O,{className:"flex items-center gap-2",children:[e.jsx(Me,{className:"w-5 h-5 text-green-600"}),"Job Details"]})}),e.jsxs(P,{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"title",children:"Job Title *"}),e.jsx(g,{id:"title",placeholder:"e.g., Kitchen Sink Repair, Deck Installation",value:a.title,onChange:t=>d("title",t.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"trade",children:"Trade / Service Type *"}),e.jsxs(B,{value:a.trade,onValueChange:t=>d("trade",t),children:[e.jsx(J,{children:e.jsx($,{placeholder:"Select a trade"})}),e.jsx(H,{children:q.map(t=>e.jsx(z,{value:t.value,children:t.label},t.value))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"description",children:"Job Description *"}),e.jsx(Le,{id:"description",placeholder:"Describe the work you need done in detail...",value:a.description,onChange:t=>d("description",t.target.value),rows:5})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{children:"Photos (optional)"}),e.jsxs("div",{className:"border-2 border-dashed border-slate-200 rounded-xl p-6 text-center",children:[e.jsx("input",{type:"file",multiple:!0,accept:"image/*",onChange:f,className:"hidden",id:"image-upload",disabled:o}),e.jsxs("label",{htmlFor:"image-upload",className:"cursor-pointer flex flex-col items-center",children:[o?e.jsx(V,{className:"w-10 h-10 text-slate-400 animate-spin mb-3"}):e.jsx(Ve,{className:"w-10 h-10 text-slate-400 mb-3"}),e.jsx("p",{className:"text-slate-600 font-medium",children:o?"Uploading...":"Click to upload photos"}),e.jsx("p",{className:"text-sm text-slate-500",children:"PNG, JPG up to 10MB each"})]})]}),a.images.length>0&&e.jsx("div",{className:"grid grid-cols-3 gap-3 mt-4",children:a.images.map((t,u)=>e.jsxs("div",{className:"relative group",children:[e.jsx("img",{src:t,alt:"",className:"w-full h-24 object-cover rounded-lg"}),e.jsx("button",{onClick:()=>v(u),className:"absolute top-1 right-1 w-6 h-6 bg-red-500 text-white rounded-full flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsx(Ee,{className:"w-4 h-4"})})]},u))})]})]})]})},"step1"),s===2&&e.jsx(w.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},children:e.jsxs(C,{children:[e.jsx(_,{children:e.jsxs(O,{className:"flex items-center gap-2",children:[e.jsx(ae,{className:"w-5 h-5 text-green-600"}),"Location & Budget"]})}),e.jsxs(P,{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"address",children:"Street Address"}),e.jsx(g,{id:"address",placeholder:"123 Main St",value:a.location_address,onChange:t=>d("location_address",t.target.value)})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"city",children:"City *"}),e.jsx(g,{id:"city",placeholder:"Grand Rapids",value:a.location_city,onChange:t=>d("location_city",t.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"state",children:"State *"}),e.jsx(g,{id:"state",placeholder:"MI",value:a.location_state,onChange:t=>d("location_state",t.target.value)})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"zip",children:"ZIP Code"}),e.jsx(g,{id:"zip",placeholder:"49503",value:a.location_zip,onChange:t=>d("location_zip",t.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(h,{className:"flex items-center gap-2",children:[e.jsx(De,{className:"w-4 h-4"}),"Budget Range (optional)"]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(g,{type:"number",placeholder:"Min",value:a.budget_min,onChange:t=>d("budget_min",t.target.value)}),e.jsx(g,{type:"number",placeholder:"Max",value:a.budget_max,onChange:t=>d("budget_max",t.target.value)})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{children:"Preferred Start Date"}),e.jsxs(la,{children:[e.jsx(na,{asChild:!0,children:e.jsxs(j,{variant:"outline",className:"w-full justify-start",children:[e.jsx(Te,{className:"w-4 h-4 mr-2"}),a.preferred_date?Y(a.preferred_date,"PPP"):"Select a date"]})}),e.jsx(ue,{className:"w-auto p-0",children:e.jsx(Be,{mode:"single",selected:a.preferred_date,onSelect:t=>d("preferred_date",t),disabled:t=>t<new Date})})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{children:"Timeline Flexibility"}),e.jsxs(B,{value:a.flexibility,onValueChange:t=>d("flexibility",t),children:[e.jsx(J,{children:e.jsx($,{})}),e.jsx(H,{children:da.map(t=>e.jsx(z,{value:t.value,children:t.label},t.value))})]})]})]})]})},"step2"),s===3&&e.jsx(w.div,{initial:{opacity:0,x:20}
1,animate:{opacity:1,x:0},exit:{opacity:0,x:-20},children:e.jsxs(C,{children:[e.jsx(_,{children:e.jsx(O,{children:"Your Contact Information"})}),e.jsxs(P,{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"name",children:"Your Name *"}),e.jsx(g,{id:"name",placeholder:"John Smith",value:a.homeowner_name,onChange:t=>d("homeowner_name",t.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"email",children:"Email *"}),e.jsx(g,{id:"email",type:"email",placeholder:"[email protected]",value:a.homeowner_email,onChange:t=>d("homeowner_email",t.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"phone",children:"Phone (optional)"}),e.jsx(g,{id:"phone",type:"tel",placeholder:"(555) 123-4567",value:a.homeowner_phone,onChange:t=>d("homeowner_phone",t.target.value)})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-5 mt-6",children:[e.jsx("h4",{className:"font-medium text-slate-900 mb-3",children:"Job Summary"}),e.jsxs("dl",{className:"space-y-2 text-sm",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("dt",{className:"text-slate-500",children:"Job:"}),e.jsx("dd",{className:"text-slate-900 font-medium",children:a.title})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("dt",{className:"text-slate-500",children:"Trade:"}),e.jsx("dd",{className:"text-slate-900",children:(T=q.find(t=>t.value===a.trade))==null?void 0:T.label})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("dt",{className:"text-slate-500",children:"Location:"}),e.jsxs("dd",{className:"text-slate-900",children:[a.location_city,", ",a.location_state]})]}),(a.budget_min||a.budget_max)&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("dt",{className:"text-slate-500",children:"Budget:"}),e.jsxs("dd",{className:"text-slate-900",children:["$",a.budget_min||"0"," - $",a.budget_max||"Open"]})]}),a.images.length>0&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("dt",{className:"text-slate-500",children:"Photos:"}),e.jsxs("dd",{className:"text-slate-900",children:[a.images.length," uploaded"]})]})]})]})]})]})},"step3"),s===4&&e.jsxs(w.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"space-y-8",children:[e.jsxs("div",{className:"text-center py-8",children:[e.jsx("div",{className:"w-20 h-20 rounded-full bg-green-100 flex items-center justify-center mx-auto mb-6",children:e.jsx(te,{className:"w-10 h-10 text-green-600"})}),e.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-3",children:"Job Request Posted!"}),e.jsx("p",{className:"text-slate-600 mb-6 max-w-md mx-auto",children:"Your job request has been submitted. Here are some contractors that match your needs:"})]}),i&&e.jsx(ca,{jobRequest:i}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4 pt-4",children:[e.jsx(F,{to:k("Search"),children:e.jsx(j,{className:"bg-green-600 hover:bg-green-700",children:"Browse All Contractors"})}),e.jsx(F,{to:k("Home"),children:e.jsx(j,{variant:"outline",children:"Back to Home"})})]})]},"step4")]}),s<4&&e.jsxs("div",{className:"flex justify-between mt-8",children:[e.jsx(j,{variant:"outline",onClick:()=>l(t=>t-1),disabled:s===1,children:"Back"}),s<3?e.jsx(j,{onClick:()=>l(t=>t+1),disabled:!N(),className:"bg-green-600 hover:bg-green-700",children:"Continue"}):e.jsx(j,{onClick:p,disabled:!N()||x.isPending,className:"bg-green-600 hover:bg-green-700",children:x.isPending?e.jsxs(e.Fragment,{children:[e.jsx(V,{className:"w-4 h-4 mr-2 animate-spin"}),"Submitting..."]}):"Post Job Request"})]})]})]})}export{Ka 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.