1import{j as s}from"./ui-COXWRdUa.js";import{r as e,L as a}from"./vendor-C6kxpFEM.js";import{aM as r,B as i,C as t,m as n,n as l,ak as o,d as c,am as d,ah as m}from"./index-DRM4XvH1.js";import{A as h}from"./arrow-left-DFlLJYLf.js";import{M as x}from"./mail-CIA0wOw9.js";import{C as j}from"./copy-Dlm6jjX9.js";function f(){const{toast:f}=r(),[g,p]=e.useState(!1),u=`${window.location.origin}/cms/register`;return s.jsxs("div",{className:"space-y-6 max-w-2xl",children:[s.jsxs("div",{children:[s.jsx(i,{variant:"ghost",size:"sm",asChild:!0,className:"mb-2",children:s.jsxs(a,{to:"/admin/users",children:[s.jsx(h,{className:"h-4 w-4 mr-2"}),"Back to Users"]})}),s.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Invite a User"}),s.jsx("p",{className:"text-muted-foreground",children:"Share the registration link with new franchisees or HQ staff."})]}),s.jsxs(t,{children:[s.jsxs(n,{children:[s.jsxs(l,{className:"flex items-center gap-2",children:[s.jsx(x,{className:"h-5 w-5"}),"Registration Link"]}),s.jsx(o,{children:"New users self-register using the link below. After signup, you can assign their role and franchise location from the Users page."})]}),s.jsxs(c,{className:"space-y-4",children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsx(d,{value:u,readOnly:!0,className:"font-mono text-sm"}),s.jsx(i,{onClick:async()=>{await navigator.clipboard.writeText(u),p(!0),f({title:"Link copied to clipboard"}),setTimeout(()=>p(!1),2e3)},variant:"outline",children:g?s.jsx(m,{className:"h-4 w-4"}):s.jsx(j,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"rounded-md border border-amber-200 bg-amber-50 p-3 text-sm text-amber-900",children:[s.jsx("strong",{children:"Note:"})," Only ",s.jsx("code",{children:"@usaninjachallenge.com"})," email addresses can register. After they sign up, go to ",s.jsx(a,{to:"/admin/users",className:"underline",children:"All Users"})," to edit their role and assigned location."]})]})]})]})}export{f 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.