1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7432],{37780:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/counselor-settings/expertise",function(){return s(54953)}])},54953:(e,t,s)=>{"use strict";s.r(t),s.d(t,{__N_SSP:()=>w,default:()=>b});var r=s(33164),i=s(44896),a=s(92430),n=s.n(a),l=s(59668),o=s(19814),c=s(12960),p=s(11454),u=s(38547),d=s(88621),x=s(45049),f=s(57516),m=s(33132),_=s(17283),h=s(37643),g=s(67946),w=!0;function b(){let[e,t]=(0,i.useState)(!1),[a,w]=(0,i.useState)([]),[b,E]=(0,i.useState)([]),[y,k]=(0,i.useState)([]),[N,S]=(0,i.useState)(!1),j=(0,m.B)(g.A),{session:v}=(0,d.SF)(),{user:A}=v,C=(0,l.useRouter)(),P=(0,o.mN)({mode:"onSubmit",reValidateMode:"onSubmit"}),{handleSubmit:M,clearErrors:D,setError:O}=P,T=async e=>{if(D(),E(e.expertise),!e.expertise||0===e.expertise.length)return void O("expertise",{message:"Please select at least 1 area of expertise"});let s={};y.filter(t=>!e.expertise.includes(t)).forEach(e=>{s[e]=0}),e.expertise.filter(e=>!y.includes(e)).forEach(e=>{s[e]=2});let r=await new c.A().post("/api/profile/?page=Expertise&action=save",{data:JSON.stringify({submittedData:{expertise:s}})});if("success"===r.status){var i;if(t(!0),!N){let t=e.expertise.map(e=>a.find(t=>t.id===+e).label);new p.A("selected_expertise_test",t.map(e=>'"'.concat(e,'"')).join(", ")).send()}C.push(null!=(i=r.redir)?i:"/counselor-settings/account")}},B=n()(()=>s.e(508).then(s.bind(s,508)),{loadableGenerated:{webpack:()=>[508]}});return(0,i.useEffect)(()=>{(async()=>{t(!0);try{var e;let t=await new c.A().get("/api/profile/?page=Expertise&action=get");if("success"!==t.status)return;if(t.form.expertise){t.form.expertise.sort((e,t)=>e.counselor_sort-t.counselor_sort),w(t.form.expertise.map(e=>({id:e.id,rank:e.rank,label:((e,t)=>{let s=e.replace(/[^a-z0-9]/gi,"").toLowerCase(),r="";return(r=A.country_id===v.country.countryMap.DE?(0,h.t)(j.expertise.forDE[s]):(0,h.t)(j.expertise[s])).length>0?r:t})(e.name,e.client_description)})));let e=t.form.expertise.filter(e=>2===e.rank).map(e=>"".concat(e.id));E(e),k(e)}S(null!=(e=t.is_page_complete)&&e)}catch(e){console.error(e)}finally{t(!1)}})()},[A.country_id,v.country.countryMap.DE,j]),(0,r.jsxs)("div",{className:"w-full max-w-[648px] mx-auto py-4 px-4 lg:py-10",children:[(0,r.jsxs)("div",{className:"accountsettings_titlebar",children:[(0,r.jsx)("h1",{"data-testid":(0,_.A)("expertise-header-message"),className:"accountsettings_titlebar_title text-3xl !font-bold leading-7",children:(0,h.t)(j.expertise.addExpertise)}),(0,r.jsx)(f.A,{className:"mb-1 md:mb-0 text-base hover:!text-site-link md:mt-3 whitespace-nowrap",href:"/counselor-settings/account/",onClick:()=>{new p.A("clicked_go_to_profile").send()},children:(0,h.t)(j.expertise.goToProfile)})]}),(0,r.jsx)(x.default,{show:e}),(0,r.jsxs)("form",{onSubmit:M(T),children:[(0,r.jsx)(o.Op,{...P,children:(0,r.jsx)(B,{smartMatchList:a,selectedExpertise:b})}),(0,r.jsx)(u.A,{isPageComplete:N,stickyMobileCta:!0,trackButtonClicks:!N})]})]})}b.pageTitle="Expertise | BetterHelp",b.displayName="CounselorExpertise"}},e=>{e.O(0,[6080,636,6593,8792],()=>e(e.s=37780)),_N_E=e.O()}]);
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.