import{r as c,j as e}from"./jsx-runtime-BMrMXMSG.js";import{i as d,s as u}from"./button-B6K71EBC.js";import{C as x,G as m}from"./authSlice-wB7ecGB_.js";import{d as f}from"./index-XrU1i-Uc.js";import{b as g}from"./utils-Br2EXFOw.js";/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const h=g("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);function p(s,t){const[a,n]=c.useState(()=>{if(typeof window>"u")return t;try{const r=window.localStorage.getItem(s);return r?JSON.parse(r):t}catch(r){return console.error("Error reading localStorage during initialization:",r),t}});return c.useEffect(()=>{if(typeof window<"u")try{window.localStorage.setItem(s,JSON.stringify(a))}catch(r){console.error("Error setting localStorage key:",s,r)}},[s,a]),[a,r=>{try{const l=r instanceof Function?r(a):r;n(l)}catch(l){console.error("Error updating state for localStorage key:",s,l)}},()=>{if(typeof window>"u")return console.warn("getStoredValue was called on the server."),t;try{const r=window.localStorage.getItem(s);return r?JSON.parse(r):t}catch(r){return console.error("Error reading localStorage key:",s,r),t}}]}const w=()=>{const s=x(m),[t,a]=p("authUser",{access:"",refresh:"",user:{pk:0,username:"",email:"",first_name:"",last_name:""}});return c.useEffect(()=>{s&&a(s)},[s,a]),c.useMemo(()=>({user:t||s}),[t,s])},b=({children:s,title:t,subtitle:a})=>{const n=f(),{user:o}=w();c.useEffect(()=>{o!=null&&o.access&&n("/")},[o,n]);const i=["Design, customize, and shop seamlessly","Access your saved designs","Track your orders"];return e.jsxs("div",{className:"flex h-screen",children:[e.jsxs("div",{className:"flex flex-col justify-between items-start bg-[url('/app/assets/auth/grid-background.svg')] bg-contain w-full h-full bg-[#101212] py-12 px-3",children:[e.jsxs("div",{className:"flex flex-col gap-5 max-w-xl mx-auto",children:[e.jsx("p",{className:"text-white text-5xl leading-snug font-semibold",children:t}),e.jsx("p",{className:"text-white text-xl",children:a})]}),e.jsxs("div",{className:"flex flex-col gap-5 max-w-xl mx-auto text-white w-full",children:[e.jsx("img",{src:d.authImg,alt:"Profile Images",className:"h-12 w-fit"}),e.jsx("p",{className:"text-lg",children:"Join 10,000+ People Creating and Personalizing Their Products"}),i.map((r,l)=>e.jsxs("div",{className:"flex gap-2 items-center text-lg",children:[e.jsx("div",{className:"text-primary border-2 border-primary w-7 h-7 rounded-full pt-1 px-0.5",children:e.jsx(h,{size:18})}),r]},l))]})]}),e.jsx("div",{className:"w-full h-full overflow-y-auto py-5",children:e.jsxs("div",{className:"flex flex-col gap-y-24 max-w-xl h-full mx-auto px-3",children:[e.jsx("div",{children:e.jsx("img",{src:u.logo,alt:"Profile Images",className:"h-10 w-fit"})}),e.jsx("div",{className:"h-full",children:s})]})})]})},E=({title:s,subtitle:t})=>e.jsxs("div",{className:"flex flex-col gap-2.5",children:[e.jsx("h2",{className:"text-3xl font-semibold",children:s}),e.jsx("h4",{className:"text-lg text-slate-500",children:t})]});export{b as A,h as C,E as H};
