import{o as e}from"./rolldown-runtime-iuO8RvI4.js";import{ut as s}from"./vendor-all-0-fRSUBfCr.js";import{Dd as t,Ll as a,Tu as r,el as l,vv as n}from"./shared-0-C4kdVF7Y.js";import{Ei as i,Mi as c,ki as o}from"./vendor-frame-CwiylG4Y.js";import{Qa as m,Qf as d}from"./shared-1-3-6x7RKF.js";import{rn as u}from"./vendor-all-2-BJdkbLSj.js";import{h,u as x}from"./vendor-all-3-CWo5e8Lw.js";import{Ds as f}from"./shared-4-6CEyRAHb.js";import{sl as p}from"./shared-5-UQAFGbWu.js";var v=e(c(),1),j=v.forwardRef((e,s)=>v.createElement(h,{ref:s,...e,weights:x}));j.displayName="ArrowLeftIcon";var b=j,k=o(),I=(0,v.createContext)({name:"",setName:s,tieredInvites:{standard:[],premium:[]},setTieredInvites:s,setStandardInvites:s,setPremiumInvites:s,role:null,setRole:s,roleOther:"",setRoleOther:s,inPlace:!1,setInPlace:s,inPlaceTouched:!1,setInPlaceTouched:s,clearStoredValue:s}),N=()=>(0,v.useContext)(I);function w({children:e}){const{account:s}=a(),[t,r,n]=l("cw-create",{name:P(s?.email_address),tieredInvites:{standard:[],premium:[]},role:null,roleOther:"",inPlace:!1,inPlaceTouched:!1}),i=(0,v.useCallback)(e=>{r(s=>({...s,name:e}))},[r]),c=(0,v.useCallback)(e=>{r(s=>({...s,tieredInvites:e}))},[r]),o=(0,v.useCallback)(e=>{r(s=>({...s,tieredInvites:{...s.tieredInvites,standard:e}}))},[r]),m=(0,v.useCallback)(e=>{r(s=>({...s,tieredInvites:{...s.tieredInvites,premium:e}}))},[r]),d=(0,v.useCallback)(e=>{r(s=>({...s,role:e}))},[r]),u=(0,v.useCallback)(e=>{r(s=>({...s,roleOther:e}))},[r]),h=(0,v.useCallback)((e,s=!1)=>{r(t=>({...t,inPlace:e,...s?{inPlaceTouched:!0}:{}}))},[r]),x=(0,v.useCallback)(e=>{r(s=>({...s,inPlaceTouched:e}))},[r]),f=(0,v.useMemo)(()=>({standard:t.tieredInvites?.standard??[],premium:t.tieredInvites?.premium??[]}),[t.tieredInvites]);return(0,k.jsx)(I.Provider,{value:{name:t.name,setName:i,tieredInvites:f,setTieredInvites:c,setStandardInvites:o,setPremiumInvites:m,role:t.role??null,setRole:d,roleOther:t.roleOther??"",setRoleOther:u,inPlace:t.inPlace??!1,setInPlace:h,inPlaceTouched:t.inPlaceTouched??!1,setInPlaceTouched:x,clearStoredValue:n},children:(0,k.jsx)(g,{children:e})})}function g({className:e,...s}){return(0,k.jsx)("main",{...s,className:i("min-h-screen flex flex-col items-center pb-12",e)})}function P(e){return e?e.split("@")[1].split(".").slice(0,-1).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""}var C=({showLogo:e=!0,backButtonClassName:s="",showBackButton:t=!0})=>{const{name:a}=N();return(0,k.jsx)(T,{name:a,showLogo:e,showBackButton:t,backButtonClassName:s})},T=({name:e,showBackButton:s=!0,showLogo:a=!0,backButtonClassName:l=""})=>{const c=u(),o=r(),h=e&&e.trim().length>0,x=t(n),v=m();return(0,k.jsxs)(k.Fragment,{children:[x&&!v&&(0,k.jsx)(p,{sticky:!0}),(0,k.jsxs)("header",{className:"flex w-full items-center justify-center pb-5 pt-8",children:[s&&(0,k.jsx)("div",{className:i("absolute left-4 z-10",x&&!v?"top-14":v?"top-12":"top-10",!x&&!v&&l),children:(0,k.jsx)(d,{variant:"ghost",size:"icon","aria-label":c.formatMessage({defaultMessage:"Back",id:"cyR7KhiuaU"}),onClick:()=>{o.back()},children:(0,k.jsx)(b,{weight:"bold",size:20})})}),a&&(0,k.jsx)("div",{className:"flex -translate-x-0.5 justify-center",children:(0,k.jsxs)(B,{children:[(0,k.jsx)(f,{className:i("flex-shrink-0",h?"h-[0.975em] translate-y-[0.05em]":"h-5 translate-y-[-0.05em]")}),h&&(0,k.jsxs)(k.Fragment,{children:[(0,k.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"}),(0,k.jsx)("div",{className:"text-text-100 hidden min-w-0 max-w-72 truncate whitespace-nowrap pb-1 text-center sm:block",children:e}),(0,k.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 B({children:e,className:s,...t}){return(0,k.jsx)("h1",{...t,className:i("flex flex-col font-claude-response text-xl mt-0.5 leading-none sm:flex-row sm:gap-[0.25em]",s),children:e})}var y=({title:e,subtitle:s})=>(0,k.jsxs)("div",{className:"mt-3 flex flex-col gap-2 sm:mt-8",children:[(0,k.jsx)("h1",{className:"font-ui-serif text-text-200 text-2xl",children:e}),s&&(0,k.jsx)(O,{children:s})]});function O({className:e,...s}){return(0,k.jsx)("p",{...s,className:i("text-text-300 pr-8 text-sm",e)})}export{w as a,T as i,O as n,N as o,C as r,b as s,y as t};