import{_ as b,u as C,a as g,o as v,c as h,b as t,t as u,d as _,h as o,K as S,i as c,l as d,C as i,g as y,y as f,j as $}from"./index-CdoXI33Z.js";import{L as k}from"./LogoutButton-BX1OX_iV.js";function w(m,l=""){const a=String(m??"").replace(/\D/g,"");if(a.length<8||a.length>15)return"";const p=`https://wa.me/${a}`;if(l){const n=new URLSearchParams;return n.set("text",l),`${p}?${n.toString()}`}return p}const L={class:"client-header"},N={class:"client-header__brand"},A={class:"header-title"},B={class:"header-business"},E={class:"client-header__actions"},I={class:"header-avatar","aria-hidden":"true"},U={class:"client-content"},V={class:"client-shell"},W={class:"bottom-nav"},P=["href"],j={__name:"ClientLayout",setup(m){const l=C(),a=g(),p=f(()=>(l.user?.name||"").split(" ").map(e=>e[0]).join("").substring(0,2).toUpperCase()||"CL"),n=f(()=>w(a.publicWhatsappPhone));return(s,e)=>{const r=$("router-link");return v(),h("div",{class:i(["client-layout",{"client-layout--wa-fab":n.value}])},[t("header",L,[t("div",N,[e[0]||(e[0]=t("div",{class:"header-mode"},"Modo cliente",-1)),t("div",A,u(_(l).user?.name?.toUpperCase()||"CLIENTE"),1),t("div",B,u(_(a).businessName),1)]),t("div",E,[o(k),t("div",I,u(p.value),1)])]),t("main",U,[t("div",V,[S(s.$slots,"default",{},void 0)])]),t("nav",W,[o(r,{to:"/client/inicio",class:i(["nav-item",{active:s.$route.path==="/client/inicio"}])},{default:c(()=>[...e[1]||(e[1]=[t("span",{class:"nav-icon"},"🏠",-1),d(" Inicio ",-1)])]),_:1},8,["class"]),o(r,{to:"/client/my-appointment",class:i(["nav-item",{active:s.$route.path==="/client/my-appointment"}])},{default:c(()=>[...e[2]||(e[2]=[t("span",{class:"nav-icon"},"📋",-1),d(" Citas ",-1)])]),_:1},8,["class"]),o(r,{to:"/client/book",class:i(["nav-item",{active:s.$route.path==="/client/book"}])},{default:c(()=>[...e[3]||(e[3]=[t("span",{class:"nav-icon"},"📅",-1),d(" Reservar ",-1)])]),_:1},8,["class"]),o(r,{to:"/client/expediente",class:i(["nav-item",{active:s.$route.path==="/client/expediente"}])},{default:c(()=>[...e[4]||(e[4]=[t("span",{class:"nav-icon"},"🖼️",-1),d(" Fotos ",-1)])]),_:1},8,["class"]),o(r,{to:"/client/perfil",class:i(["nav-item",{active:s.$route.path==="/client/perfil"}])},{default:c(()=>[...e[5]||(e[5]=[t("span",{class:"nav-icon"},"👤",-1),d(" Perfil ",-1)])]),_:1},8,["class"])]),n.value?(v(),h("a",{key:0,href:n.value,class:"client-wa-fab",target:"_blank",rel:"noopener noreferrer","aria-label":"Escribir por WhatsApp",title:"WhatsApp"},[...e[6]||(e[6]=[t("span",{class:"client-wa-fab__icon","aria-hidden":"true"},"💬",-1)])],8,P)):y("",!0)],2)}}},M=b(j,[["__scopeId","data-v-a2c6e691"]]);export{M as C};
