var x=Object.defineProperty,S=Object.defineProperties;var C=Object.getOwnPropertyDescriptors;var f=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var g=(o,r,a)=>r in o?x(o,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):o[r]=a,w=(o,r)=>{for(var a in r||(r={}))P.call(r,a)&&g(o,a,r[a]);if(f)for(var a of f(r))E.call(r,a)&&g(o,a,r[a]);return o},v=(o,r)=>S(o,C(r));import{jsxs as t,jsx as e}from"react/jsx-runtime";import{I as p}from"./input-error-BbsDx4-P.js";import{L as n,I as l,B as b}from"./ui-components-B24mpb8o.js";import{useForm as I,Link as L}from"@inertiajs/react";import _ from"./Layout-5N7ov4Wl.js";import j from"./Message-MRW2aAAM.js";import A from"./StepNavigator-DxcdYdYp.js";import"next-themes";import"sonner";import"react";import"@radix-ui/react-label";import"class-variance-authority";import"@radix-ui/react-checkbox";import"lucide-react";import"@radix-ui/react-avatar";import"@radix-ui/react-dropdown-menu";import"@radix-ui/react-scroll-area";import"@radix-ui/react-popover";import"@radix-ui/react-radio-group";import"@radix-ui/react-dialog";import"@radix-ui/react-slot";import"clsx";import"@radix-ui/react-separator";import"@radix-ui/react-tooltip";import"@radix-ui/react-tabs";import"@radix-ui/react-accordion";import"@radix-ui/react-progress";import"@radix-ui/react-select";import"cmdk";import"@radix-ui/react-switch";import"react-day-picker";import"@radix-ui/react-slider";import"embla-carousel-react";import"@radix-ui/react-toggle-group";import"vaul";import"tailwind-merge";const D=o=>{const{NAME:r,EMAIL:a,PASSWORD:c,flash:h}=o,{data:i,errors:s,post:N,setData:y}=I({name:r||"",email:a||"",password:c||"",password_confirmation:c||""}),m=d=>{const u=d.target;y(v(w({},i),{[u.name]:u.value}))};return t("div",{children:[e(A,{step1:"fill",step2:"fill",step3:"fill",step4:"active"}),t("form",{id:"dataForm",onSubmit:d=>{d.preventDefault(),N(route("install.store-step4"))},children:[e(j,{error:h.error,success:h.success}),t("div",{className:"mb-6",children:[e(n,{children:"Name"}),e(l,{id:"name",type:"text",name:"name",value:i.name,onChange:m,placeholder:"Username"}),e(p,{message:s.name})]}),t("div",{className:"mb-6",children:[e(n,{children:"Email"}),e(l,{id:"email",type:"email",name:"email",value:i.email,onChange:m,placeholder:"Email"}),e(p,{message:s.email})]}),t("div",{className:"mb-6",children:[e(n,{children:"Password"}),e(l,{id:"password",type:"password",name:"password",value:i.password,onChange:m,placeholder:"Password"}),e(p,{message:s.password})]}),t("div",{className:"mb-6",children:[e(n,{children:"Confirm Password"}),e(l,{id:"password_confirmation",type:"password",name:"password_confirmation",value:i.password_confirmation,onChange:m,placeholder:"Confirm Password"}),e(p,{message:s.password_confirmation})]}),t("div",{className:"mt-12 flex items-center justify-end gap-4",children:[e(L,{href:route("install.show-step3"),children:e(b,{type:"button",variant:"outline",className:"border border-orange-500 !bg-transparent !text-orange-500 uppercase",children:"Previous Step"})}),e(b,{type:"submit",className:"bg-orange-500 px-6 py-3 text-white uppercase hover:bg-orange-600/90",children:"Next Step"})]})]})]})};D.layout=o=>e(_,{children:o});export{D as default};
