import{r as e,j as s}from"./vendor-react-AXa6hZO5.js";import{b as t,c as a,n,a as l,u as r,G as i,B as c}from"./cec18ad9a-DiLjrOUd.js";import{c as o}from"./vendor-icons-Dy3Nea9p.js";import{u as m}from"./vendor-intl-BdADXLLt.js";import{aF as d,aG as u,aq as h}from"./index-C_tZnXTW.js";import{n as x}from"./vendor-lodash-BKAXkXVe.js";const p=e.createContext({name:"",setName:x,tieredInvites:{standard:[],premium:[]},setTieredInvites:x,setStandardInvites:x,setPremiumInvites:x,role:null,setRole:x,roleOther:"",setRoleOther:x,inPlace:!1,setInPlace:x,inPlaceTouched:!1,setInPlaceTouched:x,clearStoredValue:x}),f=()=>e.useContext(p);function j({children:n}){const{account:l}=t(),r=function(e){if(!e)return"";const s=e.split("@")[1].split(".").slice(0,-1);return s.map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}(l?.email_address),[i,c,o]=a("cw-create",{name:r,tieredInvites:{standard:[],premium:[]},role:null,roleOther:"",inPlace:!1,inPlaceTouched:!1}),m=e.useCallback(e=>{c(s=>({...s,name:e}))},[c]),d=e.useCallback(e=>{c(s=>({...s,tieredInvites:e}))},[c]),u=e.useCallback(e=>{c(s=>({...s,tieredInvites:{...s.tieredInvites,standard:e}}))},[c]),h=e.useCallback(e=>{c(s=>({...s,tieredInvites:{...s.tieredInvites,premium:e}}))},[c]),x=e.useCallback(e=>{c(s=>({...s,role:e}))},[c]),f=e.useCallback(e=>{c(s=>({...s,roleOther:e}))},[c]),j=e.useCallback((e,s=!1)=>{c(t=>({...t,inPlace:e,...s?{inPlaceTouched:!0}:{}}))},[c]),b=e.useCallback(e=>{c(s=>({...s,inPlaceTouched:e}))},[c]),k=e.useMemo(()=>({standard:i.tieredInvites?.standard??[],premium:i.tieredInvites?.premium??[]}),[i.tieredInvites]);return s.jsx(p.Provider,{value:{name:i.name,setName:m,tieredInvites:k,setTieredInvites:d,setStandardInvites:u,setPremiumInvites:h,role:i.role??null,setRole:x,roleOther:i.roleOther??"",setRoleOther:f,inPlace:i.inPlace??!1,setInPlace:j,inPlaceTouched:i.inPlaceTouched??!1,setInPlaceTouched:b,clearStoredValue:o},children:s.jsx(v,{children:n})})}function v({className:e,...t}){return s.jsx("main",{...t,className:n("min-h-screen flex flex-col items-center pb-12",e)})}const b=({showLogo:e=!0,backButtonClassName:t="",showBackButton:a=!0})=>{const{name:n}=f();return s.jsx(k,{name:n,showLogo:e,showBackButton:a,backButtonClassName:t})},k=({name:e,showBackButton:t=!0,showLogo:a=!0,backButtonClassName:x=""})=>{const p=m(),f=l(),j=e&&e.trim().length>0,v=r(i),b=d();return s.jsxs(s.Fragment,{children:[v&&!b&&s.jsx(u,{sticky:!0}),s.jsxs("header",{className:"flex w-full items-center justify-center pb-5 pt-8",children:[t&&s.jsx("div",{className:n("absolute left-4 z-10",v&&!b?"top-14":b?"top-12":"top-10",!v&&!b&&x),children:s.jsx(c,{variant:"ghost",size:"icon","aria-label":p.formatMessage({defaultMessage:"Back",id:"cyR7KhiuaU"}),onClick:()=>{f.back()},children:s.jsx(o,{weight:"bold",size:20})})}),a&&s.jsx("div",{className:"flex -translate-x-0.5 justify-center",children:s.jsxs(I,{children:[s.jsx(h,{className:n("flex-shrink-0",j?"h-[0.975em] translate-y-[0.05em]":"h-5 translate-y-[-0.05em]")}),j&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"bg-text-500 -my-[0.225em] ml-1.5 mr-1 hidden h-[1.5em] w-[0.5px] rotate-[20deg] sm:block"}),s.jsx("div",{className:"text-text-100 hidden min-w-0 max-w-72 truncate whitespace-nowrap pb-1 text-center sm:block",children:e}),s.jsx("div",{className:"text-text-100 bg-bg-300/80 ml-2 mt-1 self-center rounded-full px-2 py-1 text-sm sm:hidden",children:e})]})]})})]})]})};function I({children:e,className:t,...a}){return s.jsx("h1",{...a,className:n("flex flex-col font-claude-response text-xl mt-0.5 leading-none sm:flex-row sm:gap-[0.25em]",t),children:e})}const N=({title:e,subtitle:t})=>s.jsxs("div",{className:"mt-3 flex flex-col gap-2 sm:mt-8",children:[s.jsx("h1",{className:"font-ui-serif text-text-200 text-2xl",children:e}),t&&s.jsx(P,{children:t})]});function P({className:e,...t}){return s.jsx("p",{...t,className:n("text-text-300 pr-8 text-sm",e)})}export{N as C,k as H,b as a,j as b,P as c,f as u};
