import{_ as Z}from"./DiamaPcO.js";import{i as $,T as y,p as s,W as A}from"./CLA-Wyjx.js";import{d as T,ae as N,i as D,o as c,c as w,g as r,w as i,f as v,t as C,u as l,q as U,v as B,A as E,a6 as G,a7 as J,at as q,n as Y,s as K,aR as Q,j as P,am as X,G as ee,I as ae,z as oe,e as L,C as ne}from"./DUqQC3yF.js";import{_ as te}from"./HxEt4_dX.js";import{_ as se,a as re,b as ie}from"./Dx46SGNc.js";import{_ as le}from"./Bnl-YbhJ.js";const pe={[$.CompanyDriverW2]:"Direct Employment (W2)",[$.OwnerOperator]:"Owner Operator (O/O)",[$.IndependentContractor_1099]:"Contracted Driver (1099)",[$.Unrecognized]:"Unknown"};function ue(e){return pe[e]}const ce={[y.Local]:"Local",[y.Otr]:"OTR",[y.Regional]:"Regional",[y.SemiLocal]:"Semi-Local",[y.Training]:"Training",[y.Unrecognized]:"Unknown"};function de(e){return ce[e]}const ge={[s.A]:"Class A",[s.Az]:"Class AZ",[s.B]:"Class B",[s.C]:"Class C",[s.D]:"Class D",[s.E]:"Class E",[s[1]]:"CDL-1",[s[2]]:"CDL-2",[s[3]]:"CDL-3",[s[4]]:"CDL-4",[s[5]]:"CDL-5",[s.Unknown]:""};function me(e){return ge[e]}const fe={[A.Solo]:"Solo",[A.Team]:"Team",[A.Unrecognized]:"Unknown"};function _e(e){return fe[e]}const ve=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0,minimumFractionDigits:0});function W(e){return ve.format(e)}const he={class:"flex flex-wrap gap-2"},Re=T({__name:"Badges",props:{pay:{},workType:{},hiringType:{},jobClass:{},license:{}},setup(e){const a=e,{pay:t}=N(a),d=D(()=>{const o=W(t.value.estimatedWeeklyPayLow),p=W(t.value.estimatedWeeklyPayHigh);return o&&p&&o===p?`${p} per week`:`${o} - ${p} per week`});return(o,p)=>{const g=Z;return c(),w("div",he,[r(g,{variant:"base",class:"whitespace-nowrap group-hover:bg-foreground/10 group-hover:text-foreground text-foreground/80 transition-colors duration-300"},{default:i(()=>[v(C(l(d)),1)]),_:1}),r(g,{variant:"base",class:"whitespace-nowrap group-hover:bg-foreground/10 group-hover:text-foreground text-foreground/80 transition-colors duration-300"},{default:i(()=>[v(C(l(ue)(o.hiringType)),1)]),_:1}),o.license!==l(s).A?(c(),U(g,{key:0,variant:"base",class:"whitespace-nowrap group-hover:bg-foreground/10 group-hover:text-foreground text-foreground/80 transition-colors duration-300"},{default:i(()=>[v(C(l(me)(o.license)),1)]),_:1})):B("",!0),r(g,{variant:"base",class:"whitespace-nowrap group-hover:bg-foreground/10 group-hover:text-foreground text-foreground/80 transition-colors duration-300"},{default:i(()=>[v(C(l(de)(o.jobClass)),1)]),_:1}),o.workType!==l(A).Solo?(c(),U(g,{key:1,variant:"base",class:"whitespace-nowrap group-hover:bg-foreground/10 group-hover:text-foreground text-foreground/80 transition-colors duration-300"},{default:i(()=>[v(C(l(_e)(o.workType)),1)]),_:1})):B("",!0)])}}}),Ce=T({__name:"DialogClose",props:{asChild:{type:Boolean},as:{}},setup(e){const a=e;return(t,d)=>(c(),U(l(q),G(J(a)),{default:i(()=>[E(t.$slots,"default")]),_:3},16))}}),we=T({__name:"DialogFooter",props:{class:{}},setup(e){const a=e;return(t,d)=>(c(),w("div",{class:Y(l(K)("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2",a.class))},[E(t.$slots,"default")],2))}}),Se=T({__name:"OperatingArea",props:{operatingAreas:{},pointsOfInterest:{},candidatePosition:{},mapOptions:{}},setup(e){const a=e,t=D(()=>Q(a)),{pointsOfInterest:d,candidatePosition:o,mapOptions:p}=N(a),g=D(()=>a.operatingAreas??[]),b=P(),O=P(!1),I=X(),z=D(()=>I("/images/map/terminal-pin.png",{width:20,height:32})),j=D(()=>I("/images/map/user-map-marker.png",{width:20,height:32})),R={clickableIcons:!1,disableDefaultUI:!0,disableDoubleClickZoom:!0,gestureHandling:"none",maxZoom:12,draggableCursor:"pointer",streetViewControl:!1,mapId:"bfcaa1d68245ceb4"};ee([()=>o.value,()=>d.value,()=>g.value,()=>b.value],()=>{b.value&&S({map:b.value.map,api:b.value.api})});function S({map:k,api:n}){const h=new n.LatLngBounds;if(o.value){const{lat:m,lng:u}=o.value;h.extend({lat:m,lng:u}),new n.Marker({position:{lat:m,lng:u},cursor:"default",map:k,icon:j.value})}d.value&&d.value.forEach(({point:{lat:m,lng:u},address:f})=>{h.extend({lat:m,lng:u}),new n.Marker({position:{lat:m,lng:u},title:f,map:k,icon:z.value})}),g.value&&g.value.forEach(m=>{const u=[];m.corners.forEach(f=>{f&&(u.push({lat:f.lat,lng:f.lng}),h.extend({lat:f.lat,lng:f.lng}))}),u.length&&new n.Polygon({paths:u,fillColor:"rgba(255,139,74,0.5)",strokeColor:"rgba(255,139,74,1)",clickable:!1,draggable:!1,strokeWeight:1,map:k})}),k.fitBounds(h)}return(k,n)=>{const h=te,m=le,u=se,f=oe,F=Ce,H=we,M=re,V=ie;return c(),w("div",{key:l(t)},[r(h,{trigger:"visible",style:{width:"100%",height:"100%",maxWidth:"100%"},"map-options":{...R,...l(p)},onReady:n[0]||(n[0]=({map:_,googleMaps:x})=>{_.value&&x.value&&(b.value={map:_.value,api:x.value})}),onClick:n[1]||(n[1]=_=>O.value=!0)},null,8,["map-options"]),r(V,{open:l(O),"onUpdate:open":n[3]||(n[3]=_=>ae(O)?O.value=_:null)},{default:i(()=>[r(M,{class:"md:max-w-[800px] gap-0 md:min-h-[70dvh] min-h-[90dvh] grid-rows-[auto_minmax(0,1fr)_auto] p-0 max-h-[90dvh]"},{default:i(()=>[r(u,{class:"p-6 pb-0"},{default:i(()=>[r(m,null,{default:i(()=>n[4]||(n[4]=[v("Operating Area")])),_:1})]),_:1}),r(h,{trigger:"visible",style:{width:"100%",height:"100%",maxWidth:"100%"},"map-options":{...R,disableDefaultUI:!1,maxZoom:18,gestureHandling:"auto",...l(p)},onReady:n[2]||(n[2]=({map:_,googleMaps:x})=>{_.value&&x.value&&S({map:_.value,api:x.value})})},null,8,["map-options"]),r(H,{class:"p-4 flex items-center"},{default:i(()=>[r(F,{"as-child":""},{default:i(()=>[r(f,{variant:"outline"},{default:i(()=>n[5]||(n[5]=[v(" Close ")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])])}}}),ye={class:"p-2 bg-background flex flex-col gap-2"},be={class:"flex gap-2 items-center"},ke={key:0},xe={class:"text-sm"},De={key:1},Te={key:0,class:"flex gap-2 items-center"},Pe=T({__name:"OperatingAreaLegend",props:{postalCode:{},distanceToCandidate:{},showOperatingArea:{type:Boolean,default:!0}},setup(e){return(a,t)=>{var o,p;const d=ne;return c(),w("div",ye,[L("div",be,[r(d,{src:"/images/map/terminal-pin.png",alt:"Terminal pin",height:"22",width:"14",provider:"ipxOrCloudflare"}),(p=(o=a.distanceToCandidate)==null?void 0:o.distanceInformation)!=null&&p.distance&&a.postalCode?(c(),w("div",ke,[t[0]||(t[0]=L("div",null,"Nearest Terminal or Office Location",-1)),L("div",xe,C(a.distanceToCandidate.distanceInformation.distanceText)+" from "+C(a.postalCode),1)])):(c(),w("div",De," Terminal or Office Location "))]),a.showOperatingArea?(c(),w("div",Te,t[1]||(t[1]=[L("div",{class:"w-4 h-4 bg-[rgba(255,139,74,0.5)] border-[rgba(255,139,74,1)]"},null,-1),v(" Operating Area ")]))):B("",!0)])}}}),Oe="https://res.cloudinary.com/youcruit/image/fetch";function We(e,a){return e?`${Oe}/${a}/${e}`:""}export{Re as _,We as a,we as b,Se as c,Pe as d,Ce as e,_e as f,de as g,W as h,me as t};