1import{a as e,v as a,n as s,ak as t,Q as i,r as l,j as n,ae as r,a0 as o,$ as p,Y as c,ad as m}from"./index-Cu6nzwse.js";import{D as d}from"./DefaultAppCard-Cmmx0Y0_.js";import{A as x}from"./AppBottomSheet-DLyRu85K.js";import"./CardActions-V-_SRgyL.js";import"./MainCardButton-5CyrPA0a.js";const u=()=>{const u=e(),{user:v,profile:g}=a(),{appTypes:h}=s(),j=t(),{renderText:y}=i(),[f,N]=l.useState(!1),[b,A]=l.useState(null),[S,w]=l.useState(null),[T,C]=l.useState(!1),D="paid"!==(null==g?void 0:g.role);return n.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-white to-gray-50",children:[n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 sm:py-12 lg:py-16",children:[n.jsxs("div",{className:"text-center mb-12 sm:mb-14 lg:mb-16",children:[n.jsx("h1",{className:"headline-h1",children:y("Your Saved [brand:Mini-AI Apps]")}),n.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto mt-3",children:y("Quick access to the [brand_simple:mini-AI products] you use most. Save now, try anytime.")}),n.jsxs("div",{className:"flex flex-col sm:flex-row justify-center gap-4 mt-8",children:[n.jsxs("button",{onClick:()=>u("/"),className:"main-cta inline-flex items-center justify-center gap-2 px-8",children:["Explore Apps",n.jsx(r,{className:"w-5 h-5"})]}),D&&n.jsxs("button",{onClick:()=>C(!0),className:"inline-flex items-center justify-center gap-2 px-8 h-12 bg-transparent border border-gray-300 text-gray-700 font-medium rounded-xl hover:bg-gray-50 hover:border-[#A493D9] hover:text-[#A493D9] transition-all duration-200",children:[n.jsx(o,{className:"w-5 h-5"}),"Upgrade to Save"]})]})]}),j.loading?n.jsx("div",{className:"flex items-center justify-center py-16",children:n.jsx(p,{className:"w-10 h-10 animate-spin text-[#A493D9]"})}):0===j.savedApps.length?n.jsxs("div",{className:"flex flex-col items-center text-center py-16",children:[n.jsx(c,{className:"w-12 h-12 text-gray-300 mb-3"}),n.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"No saved apps yet"}),n.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Explore and save your favorites for quick access"})]}):n.jsx("div",{className:"columns-1 md:columns-2 lg:columns-3 gap-x-6",children:j.savedApps.map(e=>n.jsx(d,{app:e,appTypes:h,onSave:()=>(async e=>{v&&"paid"===(null==g?void 0:g.role)?await j.toggleSave(e):u("/upgrade")})(e),isSaved:!0,onNavigate:e=>u(e),onTry:(e,a)=>((e,a)=>{w(a?{a:a,b:{},active:"option-a"}:null),A(e),N(!0)})(e,a),ctaText:"Try This AI"},e.id))})]}),b&&n.jsx(x,{isOpen:f,onClose:()=>N(!1),app:b,initialInputDataA:null==S?void 0:S.a,initialInputDataB:null==S?void 0:S.b,initialActiveTab:null==S?void 0:S.active,isSaved:j.isSaved(b.id),onToggleSave:async()=>{b&&(v&&"paid"===(null==g?void 0:g.role)?await j.toggleSave(b):C(!0))}}),n.jsx(m,{isOpen:T,onClose:()=>C(!1),icon:c,title:"Save this app",description:"Save your favorite mini-AI apps for instant access, anytime."})]})};export{u as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.