import{b as u,a as h,h as j,t7 as f,r as g,t8 as y,t9 as v,j as e,B as n,_ as p,Q as s,T as m,ta as E,K as b,e3 as S,ab as L}from"./index-76d4793e.js";import{b as D}from"./index.esm-d9f89842.js";import{G as C}from"./GoBack-71b56a16.js";import{L as _}from"./List-4c24b3e8.js";import{L as B}from"./ListItem-406384cd.js";import{L as w}from"./ListItemText-40b49d6d.js";import{S as M}from"./Select-338083eb.js";import{M as l}from"./MenuItem-cff1abce.js";import"./Divider-3f770145.js";import"./dividerClasses-45958eb8.js";import"./LoadingButton-89ba2db7.js";import"./index-ecea5cfc.js";import"./useMediaQuery-8cb39c65.js";import"./useControlled-e03384de.js";import"./composeClasses-b42b2e69.js";import"./listItemTextClasses-89e7894e.js";import"./Menu-ed7c6894.js";import"./Grow-84b30c0e.js";import"./OutlinedInput-ac933786.js";import"./useFormControl-c8d490e1.js";import"./createSvgIcon-01ec10fc.js";const Z=()=>{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(v())},[]);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(B,{children:e.jsx(w,{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(E({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(b,{type:"submit",variant:"contained",color:"primary",endIcon:e.jsx(D,{}),disabled:a,sx:{mt:2},children:a?e.jsx(S,{size:24}):"Export .csv file"})]})]})})})})})})})})};export{Z as default};
