1import{l as P,d as f,c as U,w as k,o as n,a as e,t as _,p as A,y as h,H as g,M as O,e as c,F as V,h as q,f as m,J as F,O as I,B as N,C as B,g as x}from"./app-8m7Hng6q.js";import{A as M}from"./AriaLayout-Bk1pgI-d.js";import{l as T}from"./logger-BSl0LJ_t.js";import{_ as D}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ConfirmDialog-16Elg6il.js";const o=r=>(N("data-v-427da8c2"),r=r(),B(),r),G={class:"profile"},J={class:"profile-container"},W={class:"profile-header"},Y={class:"form-section"},z={class:"form-group"},E=o(()=>e("label",null,[x(" Target Position "),e("span",{class:"required"},"*")],-1)),H=o(()=>e("p",{class:"form-hint"},"What role are you preparing for?",-1)),K={class:"form-group"},L=o(()=>e("label",null,[x(" Country "),e("span",{class:"required"},"*")],-1)),j=o(()=>e("p",{class:"form-hint"},"Helps Aria understand regional communication styles",-1)),Q=o(()=>e("option",{value:""},"Select country",-1)),R=o(()=>e("option",{value:"United States"},"United States",-1)),X=o(()=>e("option",{value:"United Kingdom"},"United Kingdom",-1)),Z=o(()=>e("option",{value:"Canada"},"Canada",-1)),$=o(()=>e("option",{value:"Germany"},"Germany",-1)),ee=o(()=>e("option",{value:"France"},"France",-1)),oe=o(()=>e("option",{value:"Netherlands"},"Netherlands",-1)),te=o(()=>e("option",{value:"Poland"},"Poland",-1)),se=o(()=>e("option",{value:"Ukraine"},"Ukraine",-1)),ae=o(()=>e("option",{value:"India"},"India",-1)),ie=o(()=>e("option",{value:"Japan"},"Japan",-1)),le=o(()=>e("option",{value:"Singapore"},"Singapore",-1)),ne=o(()=>e("option",{value:"Australia"},"Australia",-1)),re=o(()=>e("option",{value:"Other"},"Other",-1)),ue=[Q,R,X,Z,$,ee,oe,te,se,ae,ie,le,ne,re],de=o(()=>e("div",{class:"form-divider"},null,-1)),ce={class:"form-section"},pe=o(()=>e("div",{class:"section-label"},"Optional Details",-1)),_e={class:"form-group"},he=o(()=>e("label",null,"Communication Challenges",-1)),ve=o(()=>e("p",{class:"form-hint"},"What do you struggle with during interviews?",-1)),fe={class:"form-group"},ge=o(()=>e("label",null,"Your Goals",-1)),me=o(()=>e("p",{class:"form-hint"},"What do you want to achieve with Aria?",-1)),ye={key:0,class:"error-box"},be=o(()=>e("i",{class:"fa-solid fa-circle-exclamation"},null,-1)),Se=o(()=>e("strong",null,"Please fix the following:",-1)),we={class:"form-actions"},xe={key:0,href:"/aria/dashboard",class:"cancel-btn"},Ce=["disabled"],Pe={key:0,class:"fa-solid fa-spinner fa-spin"},Ue={__name:"ProfileSetup",props:{profile:Object},setup(r){var y,b,S,w;const u=r,p=P(()=>{var l;return!((l=u.profile)!=null&&l.target_position)}),s=f({target_position:((y=u.profile)==null?void 0:y.target_position)||"",country:((b=u.profile)==null?void 0:b.country)||"",main_struggles:((S=u.profile)==null?void 0:S.main_struggles)||"",goals:((w=u.profile)==null?void 0:w.goals)||""}),d=f(!1),i=f([]),C=async()=>{var l,a,t;if(i.value=[],(l=s.value.target_position)!=null&&l.trim()||i.value.push("Target position is required"),s.value.country||i.value.push("Country is required"),!(i.value.length>0)){d.value=!0;try{(await F.post("/aria/profile",s.value)).data.success&&I.visit("/aria/dashboard")}catch(v){T.error("Failed to save profile:",v),i.value.push(((t=(a=v.response)==null?void 0:a.data)==null?void 0:t.message)||"Failed to save profile. Please try again."),d.value=!1}}};return(l,a)=>(n(),U(M,{title:"Profile | Aria"},{default:k(()=>[e("div",G,[e("div",J,[e("header",W,[e("h1",null,_(p.value?"Set Up Your Profile":"Your Profile"),1),e("p",null,_(p.value?"Tell us about yourself for personalized coaching":"Manage your interview preparation settings"),1)]),e("form",{onSubmit:A(C,["prevent"]),class:"profile-form"},[e("div",Y,[e("div",z,[E,H,h(e("input",{"onUpdate:modelValue":a[0]||(a[0]=t=>s.value.target_position=t),type:"text",required:"",placeholder:"e.g., Senior Software Engineer"},null,512),[[g,s.value.target_position]])]),e("div",K,[L,j,h(e("select",{"onUpdate:modelValue":a[1]||(a[1]=t=>s.value.country=t),required:""},ue,512),[[O,s.value.country]])])]),de,e("div",ce,[pe,e("div",_e,[he,ve,h(e("textarea",{"onUpdate:modelValue":a[2]||(a[2]=t=>s.value.main_struggles=t),rows:"3",placeholder:"e.g., Organizing thoughts under pressure, explaining technical concepts..."},null,512),[[g,s.value.main_struggles]])]),e("div",fe,[ge,me,h(e("textarea",{"onUpdate:modelValue":a[3]||(a[3]=t=>s.value.goals=t),rows:"3",placeholder:"e.g., Sound more confident, improve storytelling, think aloud better..."},null,512),[[g,s.value.goals]])])]),i.value.length>0?(n(),c("div",ye,[be,e("div",null,[Se,e("ul",null,[(n(!0),c(V,null,q(i.value,t=>(n(),c("li",{key:t},_(t),1))),128))])])])):m("",!0),e("div",we,[p.value?m("",!0):(n(),c("a",xe," Cancel ")),e("button",{type:"submit",disabled:d.value,class:"submit-btn"},[d.value?(n(),c("i",Pe)):m("",!0),e("span",null,_(d.value?"Saving...":p.value?"Complete Setup":"Save Changes"),1)],8,Ce)])],32)])])]),_:1}))}},Fe=D(Ue,[["__scopeId","data-v-427da8c2"]]);export{Fe 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.