import{c as u,a as h,h as j,sX as f,r as g,sY as y,sZ as E,j as e,B as n,w as p,K as s,T as m,s_ as v,E as S,Y as b,ad as L}from"./index-c1429e77.js";import{b as D}from"./index.esm-7a0e233f.js";import{G as C}from"./GoBack-8fdc2295.js";import{L as _}from"./List-7dd83a15.js";import{L as w}from"./ListItem-8bd35e37.js";import{L as B}from"./ListItemText-0c99222a.js";import{S as M}from"./Select-ea3744da.js";import{M as l}from"./MenuItem-352b4536.js";import"./CardContent-195cd99b.js";import"./LoadingButton-a5f23242.js";import"./index-6d8a6cf3.js";import"./index-10a98b8b.js";import"./useMediaQuery-6763b70c.js";import"./useControlled-f1a5b61d.js";import"./resolveProps-3c56301c.js";import"./composeClasses-b42b2e69.js";import"./isHostComponent-73d6e646.js";import"./listItemTextClasses-7e80198b.js";import"./Menu-3e8761c1.js";import"./Grow-67aedb5f.js";import"./useSlotProps-8fc8da82.js";import"./OutlinedInput-7d44f8dd.js";import"./useFormControl-674270c6.js";import"./createSvgIcon-74b4ff5d.js";import"./dividerClasses-91c74733.js";const re=()=>{const r=u(),{importExport:{exportData:i,loading:a,exportModelList:c},system:{userAccessList:z}}=h(t=>({system:j(t),importExport:f(t)}));g.useEffect(()=>{r(y()),r(E())},[]);const d=["Reaching the targets and goals set for my area.","Servicing the needs of my existing customers.","Maintaining the relationships with existing customers for repeat business.","Reporting to top managers","Keeping up to date with the products."],x=()=>{const t={model_name:i.model_name,file_format:0};r(L({objData:t}))};return e.jsx(C,{is_goback:!0,title:"Export CSV",showSaveButton:!1,loading:!1,children:e.jsx(n,{sx:{my:2},children:e.jsx(p,{children:e.jsx(s,{container:!0,spacing:2,children:e.jsx(s,{size:{xs:12},children:e.jsx(p,{sx:{p:2},children:e.jsx("form",{onSubmit:t=>{t.preventDefault(),x()},children:e.jsxs(s,{container:!0,spacing:2,children:[e.jsxs(s,{size:{xs:12,md:6},children:[e.jsx(m,{variant:"h6",children:"Before Exporting Your File"}),e.jsx(_,{dense:!0,children:d.map((t,o)=>e.jsx(w,{children:e.jsx(B,{primary:`${o+1}. ${t}`})},o))})]}),e.jsxs(s,{size:{xs:12,md:6},children:[e.jsxs(n,{component:"div",sx:{mb:2},children:[e.jsx(m,{variant:"subtitle1",children:"Select File Type"}),e.jsxs(M,{fullWidth:!0,displayEmpty:!0,value:i.model_name||"",onChange:t=>r(v({key:"model_name",value:t.target.value,type:"export"})),required:!0,children:[e.jsx(l,{value:"",disabled:!0,children:"Choose file"}),c.map((t,o)=>e.jsx(l,{value:t,children:t},o))]})]}),e.jsx(S,{type:"submit",variant:"contained",color:"primary",endIcon:e.jsx(D,{}),disabled:a,sx:{mt:2},children:a?e.jsx(b,{size:24}):"Export .csv file"})]})]})})})})})})})})};export{re as default};
