(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7753],{12737:function(e,t,s){Promise.resolve().then(s.bind(s,73300))},39763:function(e,t,s){"use strict";s.d(t,{Z:function(){return i}});var a=s(2265),r={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let n=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),i=(e,t)=>{let s=(0,a.forwardRef)((s,i)=>{let{color:u="currentColor",size:c=24,strokeWidth:l=2,absoluteStrokeWidth:o,className:d="",children:m,...h}=s;return(0,a.createElement)("svg",{ref:i,...r,width:c,height:c,stroke:u,strokeWidth:o?24*Number(l)/Number(c):l,className:["lucide","lucide-".concat(n(e)),d].join(" "),...h},[...t.map(e=>{let[t,s]=e;return(0,a.createElement)(t,s)}),...Array.isArray(m)?m:[m]])});return s.displayName="".concat(e),s}},87769:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(39763).Z)("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]])},42208:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(39763).Z)("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},15863:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(39763).Z)("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},88906:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(39763).Z)("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]])},99376:function(e,t,s){"use strict";var a=s(35475);s.o(a,"useParams")&&s.d(t,{useParams:function(){return a.useParams}}),s.o(a,"usePathname")&&s.d(t,{usePathname:function(){return a.usePathname}}),s.o(a,"useRouter")&&s.d(t,{useRouter:function(){return a.useRouter}}),s.o(a,"useSearchParams")&&s.d(t,{useSearchParams:function(){return a.useSearchParams}})},73300:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return m}});var a=s(57437),r=s(2265),n=s(99376),i=s(88906),u=s(87769),c=s(42208),l=s(15863),o=s(69064),d=s(75969);function m(){let e=(0,n.useRouter)(),[t,s]=(0,r.useState)(!1),[m,h]=(0,r.useState)(!1),[f,p]=(0,r.useState)({email:"",password:""}),x=async t=>{t.preventDefault(),h(!0);try{let t=await fetch("/api/superadmin/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)}),s=await t.json();if(!t.ok)throw Error(s.error);o.ZP.success("Login berhasil!"),e.push("/"+(0,d.J)())}catch(e){o.ZP.error(e.message||"Login gagal")}finally{h(!1)}};return(0,a.jsx)("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",children:(0,a.jsxs)("div",{className:"w-full max-w-md",children:[(0,a.jsxs)("div",{className:"text-center mb-8",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 bg-indigo-100 rounded-full mb-4",children:(0,a.jsx)(i.Z,{className:"w-8 h-8 text-indigo-600"})}),(0,a.jsx)("h1",{className:"text-2xl font-bold text-gray-900",children:"Super Admin"}),(0,a.jsx)("p",{className:"text-gray-600 mt-1",children:"Panel Manajemen Platform RestoMenu"})]}),(0,a.jsx)("div",{className:"card",children:(0,a.jsxs)("form",{onSubmit:x,className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Email"}),(0,a.jsx)("input",{type:"email",className:"input-field",placeholder:"admin@restomenu.id",value:f.email,onChange:e=>p({...f,email:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Password"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{type:t?"text":"password",className:"input-field pr-10",placeholder:"Masukkan password",value:f.password,onChange:e=>p({...f,password:e.target.value}),required:!0}),(0,a.jsx)("button",{type:"button",onClick:()=>s(!t),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:t?(0,a.jsx)(u.Z,{className:"w-5 h-5"}):(0,a.jsx)(c.Z,{className:"w-5 h-5"})})]})]}),(0,a.jsxs)("button",{type:"submit",disabled:m,className:"btn-primary w-full flex items-center justify-center gap-2",children:[m&&(0,a.jsx)(l.Z,{className:"w-4 h-4 animate-spin"}),m?"Memproses...":"Masuk"]})]})})]})})}},75969:function(e,t,s){"use strict";function a(){return"administrator"}s.d(t,{J:function(){return a}})}},function(e){e.O(0,[9064,2971,2117,1744],function(){return e(e.s=12737)}),_N_E=e.O()}]);