1import{r as c,j as e}from"./query-vendor-Dp9tfhuh.js";import{h as p,i as h,j as r,k as g,l as f,m as j,B as b,b as y,s as N,a as o}from"./index-CgOeqv80.js";import{a as v}from"./react-vendor-DfslLuwi.js";import{B as k}from"./building-2-BMIYvzwG.js";import{U as w}from"./users-9XO_ctWv.js";import{D}from"./dollar-sign-D0iC4HrG.js";import{T as C}from"./trending-up-CRE5UWZg.js";import{C as A}from"./calendar-D4RFJDPY.js";import{W as _}from"./wrench-CDdvezGQ.js";import{F as S}from"./file-text-CuOiBfSM.js";import"./ui-vendor-DW4RoVmg.js";import"./chart-vendor-BoynbIzZ.js";const M=()=>{const[n,i]=c.useState(!1),[t,l]=c.useState(null),d=v(),m=async()=>{i(!0);try{const{data:s,error:a}=await N.functions.invoke("setup-demo-account");if(a)throw a;l(s),o.success("Demo account created! Redirecting..."),setTimeout(()=>{d(`/auth?token=${s.login_token}`)},2e3)}catch(s){o.error(s.message||"Failed to setup demo account")}finally{i(!1)}},x=[{icon:k,title:"4 Properties",description:"Luxury apartments, beachfront villa, multi-family complex, and short-term rental"},{icon:w,title:"Active Tenants",description:"Complete tenant profiles with leases and payment history"},{icon:D,title:"Financial Tracking",description:"12 months of revenue, expenses, and detailed financial reports"},{icon:C,title:"Analytics",description:"Real performance metrics, occupancy rates, and ROI calculations"},{icon:A,title:"Bookings & Listings",description:"Short-term rental management with confirmed bookings"},{icon:_,title:"Maintenance",description:"Active maintenance requests with different priority levels"},{icon:S,title:"Documents",description:"Lease agreements and property documentation"}];return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-hero p-4",children:e.jsx("div",{className:"w-full max-w-4xl",children:e.jsxs(p,{className:"shadow-elevated",children:[e.jsxs(h,{className:"text-center space-y-4",children:[e.jsx("div",{className:"flex justify-center",children:e.jsx("div",{className:"h-20 w-20 rounded-full bg-gradient-primary flex items-center justify-center",children:e.jsx(r,{className:"h-10 w-10 text-white"})})}),e.jsx(g,{className:"text-3xl md:text-4xl font-bold",children:"Experience JHA Solutions Demo"}),e.jsx(f,{className:"text-lg",children:"Explore a fully-featured property management system with realistic data"})]}),e.jsx(j,{className:"space-y-8",children:t?e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{className:"bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-lg p-6",children:[e.jsx("h3",{className:"font-semibold text-green-900 dark:text-green-100 mb-4 text-xl",children:"Demo Account Ready! ð"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg",children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Properties"}),e.jsx("p",{className:"text-2xl font-bold",children:t.account_summary.total_properties})]}),e.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg",children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Active Tenants"}),e.jsx("p",{className:"text-2xl font-bold",children:t.account_summary.active_tenants})]}),e.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg",children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Net Profit"}),e.jsxs("p",{className:"text-2xl font-bold text-green-600",children:["âª",t.account_summary.net_profit.toLocaleString()]})]}),e.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg",children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Occupancy Rate"}),e.jsx("p",{className:"text-2xl font-bold",children:t.account_summary.occupancy_rate})]})]}),e.jsxs("div",{className:"bg-muted border border-border rounded-lg p-4",children:[e.jsx("p",{className:"text-sm font-semibold mb-2",children:"Your Demo Login Token:"}),e.jsx("code",{className:"block bg-white dark:bg-gray-800 p-3 rounded font-mono text-sm break-all",children:t.login_token}),e.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Save this token - you can use it to access the demo account anytime"})]}),e.jsx("p",{className:"text-sm text-center text-muted-foreground",children:"Redirecting you to the demo account..."})]})]})}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid md:grid-cols-2 gap-4",children:x.map((s,a)=>{const u=s.icon;return e.jsxs("div",{className:"flex gap-3 p-4 rounded-lg bg-muted/50 hover:bg-muted transition-colors",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"h-10 w-10 rounded-full bg-primary/10 flex items-center justify-center",children:e.jsx(u,{className:"h-5 w-5 text-primary"})})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold mb-1",children:s.title}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s.description})]})]},a)})}),e.jsxs("div",{className:"bg-primary/5 border border-primary/20 rounded-lg p-6",children:[e.jsxs("h3",{className:"font-semibold mb-2 flex items-center gap-2",children:[e.jsx(r,{className:"h-5 w-5 text-primary"}),"What's Included"]}),e.jsxs("ul",{className:"space-y-2 text-sm text-muted-foreground",children:[e.jsx("li",{children:"⢠Complete property portfolio with realistic data"}),e.jsx("li",{children:"⢠12 months of financial history and transactions"}),e.jsx("li",{children:"⢠Active tenant leases and payment records"}),e.jsx("li",{children:"⢠Maintenance requests in different statuses"}),e.jsx("li",{children:"⢠Short-term rental bookings and listings"}),e.jsx("li",{children:"⢠Accurate financial calculations and analytics"})]})]}),e.jsx(b,{size:"lg",className:"w-full",onClick:m,disabled:n,children:n?e.jsxs(e.Fragment,{children:[e.jsx(y,{className:"mr-2 h-5 w-5 animate-spin"}),"Creating Demo Account..."]}):e.jsxs(e.Fragment,{children:[e.jsx(r,{className:"mr-2 h-5 w-5"}),"Create Demo Account"]})})]})})]})})})};export{M 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.