1import{q as E,r as a,j as t,Y as Te,y as g}from"./app-IXUJWYlY.js";import{b as Oe,u as Ee,r as Je,L as Re,s as le,p as J,v as Ae}from"./Layout-DMTzjO4C.js";import{M as De}from"./JobSearch-B3v79vmZ.js";import{B as Ie}from"./Button-DE1V2Czm.js";import{D as n}from"./Dropdown-xHe_ufyz.js";import{o as R,s as A,a as D,b as I,d as B}from"./selectOptions-DYhKIlb1.js";import{J as Be,a as $e,b as Ve,c as ke,d as Ue}from"./JobAlertsCallout-CnqBi9xy.js";import{u as qe,g as ie}from"./useCities-DeDP2yLc.js";import{t as o,F as Ye,a as ze,b as j}from"./filterPanel-BMXrLXf3.js";import{F as ne}from"./FacetLinks-DS1HfCli.js";import"./index-CkO7RN6o.js";import"./floating-ui.dom-Cz7y4tb9.js";import"./InputError-DiECPOvo.js";import"./PaginationItem-CPuo2ig6.js";import"./GetJobAlertsButton-Bqr2DL5J.js";import"./react-responsive-modal.esm-DtBshu4l.js";const oe=c=>c.toLowerCase().replace(/\s+/g,"-"),ce=(c,f,s,p)=>`${c??`/jobs/${f.toLowerCase()}/${oe(s)}`}/${oe(p)}`;function ct({jobs:c,totalJobs:f,seo:s,stateContent:p,topCities:v,moreCities:_,cityBase:$,cityHrefs:u,durationNav:pe,professionNav:ue,currentPage:me,lastPage:xe}){var X,Z,H,ee,te,se,ae,re;const{filters:i={},sort:V={},alertCriteria:k={}}=E().props;E().props.auth.user;const[U,C]=a.useState(!1),[de,q]=a.useState(!1),[r,Y]=a.useState(o(i.state,le)),[d,F]=a.useState(o(i.city)),he=r.map(e=>e.value),{cities:z}=qe(he),[m,fe]=a.useState(o(i.duration,D)),[w,be]=a.useState(o(i.profession,R)),[x,ye]=a.useState(o(i.subspecialty,A)),[N,Se]=a.useState(o(i.pay_type,B)),[h,ge]=a.useState(o(i.tax_type,I)),[L,je]=a.useState(i.pay_min||""),[K]=a.useState(i.pay_max||""),[M,ve]=a.useState(Oe(V.value||"",V.direction||"desc")),W=a.useRef(),G=a.useRef(),_e=a.useRef();Ee(W,()=>{U&&C(!1)},[G]);const Ce=()=>r.length?ie(z,r):[],Fe=(e,l)=>{if(l.action==="clear"){Y([]),F([]);return}if(l.action==="remove-value"){const P=ie(z,e),T=new Set(P.map(O=>O.value));F(d.filter(O=>T.has(O.value)))}Y(e)},we=()=>{const e={state:r,city:d,duration:m,profession:w,subspecialty:x,pay_type:N,tax_type:h,pay_min:L,pay_max:K,sort:J(M)},l=Ae({profession:w,duration:m,state:r,city:d,subspecialty:x});l?g.get(l,{sort:e.sort,pay_type:e.pay_type,tax_type:e.tax_type,pay_min:e.pay_min,pay_max:e.pay_max},{preserveState:!1,preserveScroll:!1}):g.get("/jobs",e,{preserveState:!1,preserveScroll:!1}),C(!1)},Ne=e=>{const l={state:r,city:d,duration:m,profession:w,subspecialty:x,pay_type:N,tax_type:h,pay_min:L,pay_max:K,sort:J(e)};g.get(window.location.pathname,l,{preserveState:!1,preserveScroll:!1}),q(!1)},b=(e,l)=>e.filter(P=>l.some(T=>T.value==P.value)),Le=e=>{g.get(window.location.pathname,{sort:J(M),page:e},{preserveState:!1,preserveScroll:!1})},Me=((Z=(X=E().props)==null?void 0:X.ziggy)==null?void 0:Z.url)||"https://anesthesiajobs.com",Pe=Je(c,f,Me),{state:Q,prof:y}=s,S=s.phrase||y;return t.jsxs(t.Fragment,{children:[t.jsxs(Te,{children:[t.jsx("title",{children:s.title}),t.jsx("meta",{name:"description",content:s==null?void 0:s.description}),t.jsx("meta",{property:"og:title",content:s.title}),t.jsx("meta",{property:"og:description",content:s==null?void 0:s.description}),t.jsx("meta",{name:"keywords",content:`${S} jobs ${Q}`}),s!=null&&s.noindex?t.jsx("meta",{name:"robots",content:"noindex,follow"}):null,t.jsx("script",{type:"application/ld+json",children:JSON.stringify(Pe)})]}),t.jsx(Re,{children:t.jsxs("section",{className:"flex flex-col items-center m-3 mt-0 md:mx-12 JobSearch",children:[t.jsx("h1",{className:Be,children:s.h1||`${y} Jobs in ${Q}`}),t.jsx($e,{totalJobs:f,isFilter:U,setIsFilter:C,isSort:de,setIsSort:q,filterBtnRef:G,sortBtnRef:_e,sortCombined:M,onSortChange:e=>{ve(e),Ne(e)},alertCriteria:k,alertInitialFilters:{duration:((H=m[0])==null?void 0:H.value)??"",subspecialty:((ee=x[0])==null?void 0:ee.value)??"",tax_type:((te=h[0])==null?void 0:te.value)??"",states:r.map(e=>(e==null?void 0:e.label)??e)},filterPanel:t.jsxs("div",{ref:W,className:Ye,children:[t.jsx("div",{className:ze,children:t.jsx(Ie,{success:!0,onClick:we,children:"Apply"})}),t.jsxs("div",{className:j,children:[t.jsx(n,{hideError:!0,isSearchable:!0,className:"flex-1 min-w-0 !pb-3",closeMenuOnSelect:!0,value:r,onChange:Fe,isMulti:!0,label:"State(s)",isClearable:!0,options:le}
1),t.jsx(n,{closeMenuOnSelect:!0,hideError:!0,className:"flex-1 min-w-0 !pb-3",isDisabled:!r.length,label:"City(s)",isMulti:!0,value:d,isSearchable:!0,options:Ce(),onChange:e=>F(e)})]}),t.jsxs("div",{className:j,children:[t.jsx(n,{hideError:!0,closeMenuOnSelect:!0,defaultValue:y?R.filter(e=>e.value.toUpperCase()===y.toUpperCase())[0]:null,onChange:e=>be(e),isMulti:!0,isSearchable:!1,className:"flex-1 min-w-0 !pb-3",label:"Profession",options:R}),t.jsx(n,{hideError:!0,closeMenuOnSelect:!0,defaultValue:b(A,x),onChange:e=>ye(e),isMulti:!0,isSearchable:!1,className:"flex-1 min-w-0 !pb-3",label:"Subspecialty",options:A})]}),t.jsxs("div",{className:j,children:[t.jsx(n,{hideError:!0,closeMenuOnSelect:!0,defaultValue:b(D,m),onChange:e=>fe(e),isMulti:!0,isSearchable:!1,className:"flex-1 min-w-0 !pb-3",label:"Duration",options:D}),t.jsx(n,{hideError:!0,closeMenuOnSelect:!0,defaultValue:b(I,h),onChange:e=>ge(e),isMulti:!0,isSearchable:!1,className:"flex-1 min-w-0 !pb-3",label:"Tax Status",options:I})]}),t.jsxs("div",{className:j,children:[t.jsx(n,{hideError:!0,closeMenuOnSelect:!0,defaultValue:b(B,N),onChange:e=>Se(e),isMulti:!0,isSearchable:!1,className:"flex-1 min-w-0 !pb-3",label:"Pay Type",options:B}),t.jsx(De,{value:L,onChange:je,className:"flex-1 min-w-0 !pb-3"})]})]})}),t.jsx(ne,{title:"Profession",allLabel:"All professions",nav:ue}),t.jsx(ne,{title:"Duration",nav:pe}),t.jsx("div",{className:"flex flex-col w-full gap-6 mt-4",children:c.map((e,l)=>t.jsx(Ve,{job:e},e.id))}),t.jsx(ke,{currentPage:me,lastPage:xe,onChange:Le}),t.jsx(Ue,{criteria:k,initialFilters:{duration:((se=m[0])==null?void 0:se.value)??"",subspecialty:((ae=x[0])==null?void 0:ae.value)??"",tax_type:((re=h[0])==null?void 0:re.value)??"",states:r.map(e=>(e==null?void 0:e.label)??e)}}),v&&v.length>0&&S&&(s==null?void 0:s.state)&&t.jsxs("section",{className:"mt-16",children:[t.jsxs("h2",{className:"text-2xl font-bold text-primary md:text-3xl",children:[S," Jobs by City in ",s.state]}),t.jsxs("p",{className:"mt-3 text-greyText",children:["Browse ",s.phrase?s.phrase.toLowerCase().replace(/\b(crna|caa|prn)\b/g,e=>e.toUpperCase()):S.toLowerCase()," openings in the ",s.state," cities with the most listings."]}),t.jsx("div",{className:"grid grid-cols-2 gap-3 mt-6 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5",children:v.map(e=>t.jsx("a",{href:(u==null?void 0:u[e])??ce($,s.prof??"",s.state,e),className:"px-4 py-3 text-sm font-semibold transition-colors bg-white border rounded-lg border-black/10 text-primary hover:bg-primary hover:!text-white",children:e},e))}),_&&_.length>0&&t.jsxs(t.Fragment,{children:[t.jsxs("h3",{className:"mt-10 text-lg font-bold text-primary",children:["More ",s.state," cities with open jobs"]}),t.jsx("ul",{className:"flex flex-wrap mt-3 gap-x-4 gap-y-1",children:_.map(e=>t.jsx("li",{children:t.jsx("a",{href:(u==null?void 0:u[e])??ce($,s.prof??"",s.state,e),className:"inline-flex items-center min-h-[28px] text-sm underline text-primary hover:no-underline",children:e})},e))})]})]}),p&&t.jsxs("section",{className:"cta-band p-10 mt-16 text-white bg-primary rounded-2xl md:p-16",children:[t.jsx("h2",{className:"text-2xl font-bold md:text-3xl",children:p.heading}),t.jsx("p",{className:"mt-6 text-base leading-relaxed text-white/90",dangerouslySetInnerHTML:{__html:p.body}}),t.jsx("p",{className:"mt-4 text-base leading-relaxed text-white/90",children:p.browse})]})]})})]})}export{ct 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.