import{c as u,a as h,h as f,tc as j,r as g,td as y,te as E,j as t,B as n,w as p,K as r,T as m,tf as v,E as S,Y as b,ad as L}from"./index-d9e0bbb9.js";import{b as D}from"./index.esm-7c8d9040.js";import{G as C}from"./GoBack-a3ff988c.js";import{L as w}from"./List-c3ed6b04.js";import{L as B}from"./ListItem-84bb2168.js";import{L as _}from"./ListItemText-ee3c83e5.js";import{S as M}from"./Select-661ba76b.js";import{M as l}from"./MenuItem-086da23e.js";import"./CardContent-0df4f94a.js";import"./LoadingButton-378d10f9.js";import"./index-3bec8271.js";import"./index-1253245b.js";import"./useMediaQuery-1b7ae287.js";import"./useControlled-ba6710bb.js";import"./resolveProps-ba55e2df.js";import"./composeClasses-b42b2e69.js";import"./isHostComponent-73d6e646.js";import"./listItemTextClasses-2867fd89.js";import"./Menu-c23c1491.js";import"./Grow-ca477235.js";import"./useSlotProps-a7d9b3b8.js";import"./OutlinedInput-8f17518b.js";import"./useFormControl-8bb67ca0.js";import"./createSvgIcon-c99d086f.js";import"./dividerClasses-35463663.js";const st=()=>{const s=u(),{importExport:{exportData:i,loading:a,exportModelList:c},system:{userAccessList:z}}=h(e=>({system:f(e),importExport:j(e)}));g.useEffect(()=>{s(y()),s(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 e={model_name:i.model_name,file_format:0};s(L({objData:e}))};return t.jsx(C,{is_goback:!0,title:"Export CSV",showSaveButton:!1,loading:!1,children:t.jsx(n,{sx:{my:2},children:t.jsx(p,{children:t.jsx(r,{container:!0,spacing:2,children:t.jsx(r,{size:{xs:12},children:t.jsx(p,{sx:{p:2},children:t.jsx("form",{onSubmit:e=>{e.preventDefault(),x()},children:t.jsxs(r,{container:!0,spacing:2,children:[t.jsxs(r,{size:{xs:12,md:6},children:[t.jsx(m,{variant:"h6",children:"Before Exporting Your File"}),t.jsx(w,{dense:!0,children:d.map((e,o)=>t.jsx(B,{children:t.jsx(_,{primary:`${o+1}. ${e}`})},o))})]}),t.jsxs(r,{size:{xs:12,md:6},children:[t.jsxs(n,{component:"div",sx:{mb:2},children:[t.jsx(m,{variant:"subtitle1",children:"Select File Type"}),t.jsxs(M,{fullWidth:!0,displayEmpty:!0,value:i.model_name||"",onChange:e=>s(v({key:"model_name",value:e.target.value,type:"export"})),required:!0,children:[t.jsx(l,{value:"",disabled:!0,children:"Choose file"}),c.map((e,o)=>t.jsx(l,{value:e,children:e},o))]})]}),t.jsx(S,{type:"submit",variant:"contained",color:"primary",endIcon:t.jsx(D,{}),disabled:a,sx:{mt:2},children:a?t.jsx(b,{size:24}):"Export .csv file"})]})]})})})})})})})})};export{st as default};
