import{j as u,al as o,ak as i,B as n,b as a}from"./mui-vendor-CkIVaoQP.js";import{r as l}from"./react-vendor-CmFgShSM.js";import{u as c}from"./redux-vendor-B7uoacJt.js";import{u as d,c as p,b as C,M as h,G as r,S as t,N as m,jV as x}from"./index-Vwb3Bce5.js";import{S as j}from"./SimpleTable-B3_6HY_p.js";import"./index-CgNdnt2v.js";import"./Close-8pFLGZ5w.js";import"./Search-CLlOaERQ.js";import"./Delete-DHYHiC8G.js";const A=()=>{const e=d({initialValues:{price:"",description:""},validationSchema:p({description:h().required("لطفا پیغام خود را بنویسید!").typeError("لطفا فیلد را پر کنید!"),price:C().required("لطفا عدد وارد کنید!").typeError("لطفا فیلد را پر کنید!")})});return l.useEffect(()=>{e.validateForm()},[]),u.jsx(r,{children:u.jsxs(r,{container:!0,gap:t.SMALL,direction:"column",children:[u.jsx(r,{children:u.jsx(o,{disablePortal:!0,id:"province",renderInput:s=>u.jsx(i,{...s,label:"انتخاب مرغدار "})})}),u.jsx(r,{children:u.jsx(i,{fullWidth:!0,id:"price",label:"مبلغ",variant:"outlined",value:e.values.price,error:e.touched.price?!!e.errors.price:null,onChange:e.handleChange,onBlur:e.handleBlur,helperText:e.touched.price&&e.errors.price?e.errors.price:null})}),u.jsx(r,{children:u.jsx(i,{fullWidth:!0,multiline:!0,rows:5,id:"description",label:"توضیحات",variant:"outlined",value:e.values.description,error:e.touched.description?!!e.errors.description:null,onChange:e.handleChange,onBlur:e.handleBlur,helperText:e.touched.description&&e.errors.description?e.errors.description:null})}),u.jsx(r,{children:u.jsx(n,{fullWidth:!0,variant:"contained",children:"ثبت اطلاعات"})})]})})},M=()=>{const e=c();return u.jsx(u.Fragment,{children:u.jsx(a,{display:"flex",justifyContent:"center",children:u.jsx(r,{container:!0,direction:"column",justifyContent:"center",xs:12,sm:12,md:10,lg:10,children:u.jsxs(r,{justifyContent:"center",my:t.MEDIUM,children:[u.jsx(r,{container:!0,xs:12,alignItems:"start",gap:t.SMALL,direction:"column",children:u.jsx(n,{startIcon:u.jsx(x,{}),className:"first-step",variant:"contained",onClick:()=>{e(m({title:"ثبت اطلاعات جوجه ریزی",right:!(window.innerWidth<=600),bottom:window.innerWidth<=600,content:u.jsx(A,{})}))},children:"ثبت بدهی جدید"})}),u.jsx(r,{container:!0,justifyContent:"space-between",gap:t.SMALL,children:u.jsx(r,{width:"100%",mt:t.MEDIUM,children:u.jsx(j,{columns:["نام مرغدار","مبلغ","توضیحات","سند"],data:[["ssss"]]})})})]})})})})};export{M as default};
