1import{r as c,am as u,K as g,j as e,H as v,m as j,O as w,k as y,B as N,A as P}from"./index-DtinW7og.js";import{L as m}from"./lock-ChRUycXj.js";import{S as A}from"./shield-check-CUill24P.js";const x={admin:{title:"Acesso Administrador",subtitle:"Por favor, insira a senha para acessar o painel de administrador."},escritor:{title:"Acesso Escritor",subtitle:"Por favor, insira a senha para acessar o painel de escritor."},"mov-plus-admin":{title:"Acesso PG MOV+",subtitle:"Por favor, insira a senha da Presidência Geral para gerenciar a plataforma."}},k=({pageType:s,onCorrectPassword:t})=>{const[r,a]=c.useState(""),[i,n]=c.useState(""),{checkPassword:p}=u(),{toast:l}=g(),h=x[s]||x.admin,{title:d,subtitle:b}=h,f=async o=>{o.preventDefault(),n(""),await p(r,s)?(l({title:"Acesso concedido!"}),t()):(n("Senha incorreta. Tente novamente."),l({variant:"destructive",title:"Acesso negado",description:"A senha inserida está incorreta."}))};return e.jsxs(e.Fragment,{children:[e.jsx(v,{children:e.jsxs("title",{children:[d," - MOV"]})}),e.jsxs("section",{className:"relative min-h-[70vh] flex items-center justify-center overflow-hidden bg-background py-16 md:py-20",children:[e.jsx("div",{className:"pointer-events-none absolute inset-0 opacity-[0.045] bg-[linear-gradient(to_right,currentColor_1px,transparent_1px),linear-gradient(to_bottom,currentColor_1px,transparent_1px)] bg-[size:48px_48px] text-foreground"}),e.jsx("div",{className:"pointer-events-none absolute left-1/2 top-0 h-[500px] w-[600px] -translate-x-1/2 rounded-full bg-primary/5 blur-3xl"}),e.jsx("div",{className:"container relative z-10 mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs(j.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.5},className:"mx-auto w-full max-w-md",children:[e.jsxs("div",{className:"mb-8 text-center",children:[e.jsx("div",{className:"mx-auto mb-6 flex h-16 w-16 items-center justify-center rounded-2xl border border-primary/20 bg-primary/10",children:e.jsx(m,{className:"h-7 w-7 text-primary"})}),e.jsxs("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-primary/20 bg-primary/10 px-4 py-2 text-[10px] font-black uppercase tracking-[0.16em] text-primary",children:[e.jsx(A,{className:"h-3.5 w-3.5"}),"Ãrea Restrita"]}),e.jsx("h1",{className:"text-3xl font-black tracking-tight text-foreground sm:text-4xl",children:d}),e.jsx("p",{className:"mx-auto mt-3 max-w-sm text-sm font-medium leading-relaxed text-muted-foreground md:text-base",children:b})]}),e.jsx("div",{className:"rounded-3xl border border-border bg-card p-8 shadow-xl md:p-10",children:e.jsxs("form",{onSubmit:f,className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx(w,{htmlFor:"password",children:"Senha de Acesso"}),e.jsxs("div",{className:"relative group",children:[e.jsx(m,{className:"pointer-events-none absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 text-muted-foreground transition-colors group-focus-within:text-primary"}),e.jsx(y,{id:"password",type:"password",value:r,onChange:o=>a(o.target.value),required:!0,autoFocus:!0,className:"pl-12",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢"})]}),i&&e.jsx("p",{className:"mt-2 text-sm font-medium text-destructive",children:i})]}),e.jsxs(N,{type:"submit",size:"lg",className:"h-12 w-full rounded-full bg-primary font-black text-primary-foreground shadow-lg transition-all hover:-translate-y-0.5 hover:bg-primary/90 hover:shadow-primary/25 md:h-14",children:["Entrar ",e.jsx(P,{className:"ml-2 h-5 w-5"})]})]})})]})})]})]})},R=({children:s,pageType:t})=>{const{isAuthenticated:r,setAuthenticatedPage:a}=u();return r(t)?s:e.jsx(k,{pageType:t,onCorrectPassword:()=>a(t,!0)})};export{R 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.