import{_ as $,k as N,c as r,l as v,m as u,a as t,t as s,u as a,i as o,f as b,e as V,F as _,n as y,h as z,p as I,q as L,r as k,o as n,j as x,y as f,z as w}from"./index-Hx407ukZ.js";const T={class:"row",style:{"align-items":"center"}},j={style:{margin:"0"}},F={class:"muted",style:{"margin-left":"auto"}},q={key:0,class:"row",style:{margin:"12px 0",gap:"10px"}},D={class:"primary"},E={class:"grid"},M={class:"row",style:{"justify-content":"space-between"}},R={class:"diff"},S={class:"muted"},G={class:"muted"},H={class:"muted"},J={class:"muted",style:{"margin-top":"6px"}},K={class:"primary",style:{width:"100%"}},O={class:"primary",style:{width:"100%"}},Q={key:1,class:"muted",style:{"margin-top":"auto","font-size":"12px"}},U={__name:"Personas",setup(W){const c=z().params.gid,p=k([]),B=k(!0);async function A(){try{p.value=(await I.listPersonas(c)).personas}finally{B.value=!1}}function C(i){return p.value.filter(l=>l.tier===i)}function P(i){return o.t(i==="A"?"tierA":i==="B"?"tierB":"tierC")}function g(i){return i==="won"?o.t("won"):i==="lost"?o.t("lost"):o.t("notTried")}return N(A),(i,l)=>{const d=L("router-link");return n(),r("div",null,[v(d,{to:"/training",class:"btn-back"},{default:u(()=>[x("← "+s(a(o).t("training")),1)]),_:1}),t("div",T,[t("h2",j,s(a(o).t("personas")),1),t("span",F,s(a(o).t("selectPersona")),1)]),a(b).isAdmin?(n(),r("div",q,[v(d,{to:`/admin/groups/${a(c)}/edit`},{default:u(()=>[t("button",D,"🛠 "+s(a(o).t("managePersonas")),1)]),_:1},8,["to"]),l[0]||(l[0]=t("span",{class:"muted"},"Admin: full persona data + edit available here.",-1))])):V("",!0),(n(),r(_,null,y(["A","B","C"],m=>t("div",{key:m,style:{margin:"20px 0"}},[t("h4",null,s(P(m)),1),t("div",E,[(n(!0),r(_,null,y(C(m),e=>(n(),r("div",{key:e.id,class:"card pcard lift"},[t("div",M,[t("strong",null,s(e.name),1),t("span",{class:f(["badge",e.my_outcome])},s(g(e.my_outcome)),3)]),t("div",R,[(n(),r(_,null,y(5,h=>t("span",{key:h,class:f(["star",{on:h<=(e.difficulty||1)}])},"★",2)),64)),t("span",S,s(a(o).t("difficulty"))+" "+s(e.difficulty||1)+"/5",1)]),t("div",G,[x(s(e.profession)+" · "+s(e.age_group)+" · "+s(e.location),1),l[1]||(l[1]=t("br",null,null,-1)),t("span",{class:f(["badge",e.channel])},s(e.channel),3),t("span",H," · "+s(e.initiation_mode==="seller"?a(o).t("sellerInitiated"):a(o).t("customerInitiated")),1)]),t("div",J,s(e.product_context),1),a(b).isAdmin?(n(),w(d,{key:0,to:`/groups/${a(c)}/chat/${e.id}`,style:{"margin-top":"auto"}},{default:u(()=>[t("button",K,s(a(o).t("chat")),1)]),_:1},8,["to"])):(n(),r(_,{key:1},[e.my_outcome==="not_tried"?(n(),w(d,{key:0,to:`/groups/${a(c)}/chat/${e.id}`,style:{"margin-top":"auto"}},{default:u(()=>[t("button",O,s(a(o).t("chat")),1)]),_:1},8,["to"])):(n(),r("div",Q,"✓ "+s(a(o).t("trained"))+" ("+s(g(e.my_outcome))+")",1))],64))]))),128))])])),64))])}}},Z=$(U,[["__scopeId","data-v-f8bfbe2d"]]);export{Z as default};