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-7d3dbb9c.js";import{b as D}from"./index.esm-f618d86e.js";import{G as C}from"./GoBack-3bb20b9f.js";import{L as w}from"./List-d7c020ab.js";import{L as B}from"./ListItem-409b4a2b.js";import{L as _}from"./ListItemText-86a8a23f.js";import{S as M}from"./Select-762ec619.js";import{M as l}from"./MenuItem-02b6c30e.js";import"./CardContent-184f4e92.js";import"./LoadingButton-323cc52e.js";import"./index-7976e00d.js";import"./index-e9cb9551.js";import"./useMediaQuery-77b67f07.js";import"./useControlled-338e346b.js";import"./resolveProps-4b8623f7.js";import"./composeClasses-b42b2e69.js";import"./isHostComponent-73d6e646.js";import"./listItemTextClasses-626eaddb.js";import"./Menu-5245abf0.js";import"./Grow-1b15246b.js";import"./useSlotProps-f2e72ab1.js";import"./OutlinedInput-e6d419ce.js";import"./useFormControl-7314cc67.js";import"./createSvgIcon-25cfe1a8.js";import"./dividerClasses-59256fce.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};
