import{j as e}from"./vendor-mui-69397583.js";import{A as m}from"./AdaptableCard-df7695d6.js";import{r as i}from"./vendor-react-ece1c85f.js";import{u as R,A as p,r as E,s as F}from"./AddEditTranslation-43beae49.js";import{Y as y,l as L,B as v,V as O}from"./index-c62ac197.js";import"./Alert-7dfbd254.js";import"./index-6b6d0f06.js";import"./index-c2088808.js";import{D as u}from"./Drawer-949c18c6.js";import"./FormContainer-91c2b0e4.js";import"./Switcher-c8648037.js";import"./index-36228db5.js";import"./Upload-fb34ce03.js";import{A as V,T as f}from"./actioncell-17e12e21.js";import{D as M}from"./tableV2-4d1c9fd2.js";import{u as k}from"./usePermission-d94b4984.js";import"./index-36ba4ea7.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-25c4d4ed.js";import"./StickyFooter-5b934274.js";import"./index.esm-70ab539c.js";import"./index-fcc1c999.js";import"./Notify-bb3ce372.js";import"./index-e4c6057f.js";import"./vendor-redux-a1f00e6b.js";import"./CompanyService-1bf7c3c8.js";import"./vendor-pdf-b2a5d8b1.js";import"./vendor-devex-33a39e11.js";import"./vendor-i18n-2fcb1983.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-eccea5d1.js";import"./FileSaver.min-20f3f13a.js";import"./DensitySelector-a2c1c68f.js";import"./NoData-8c485a3a.js";y("TranslationData",E);const Ce=()=>{const[h,x]=i.useState([]),[j,r]=i.useState(!1),[w,d]=i.useState(!1),[g,C]=i.useState(null),a=k("Translation"),b={edit:a==null?void 0:a.isEdit,delete:a==null?void 0:a.isDelete,view:!1},[P,D]=i.useState(!1);i.useState(!1);const[q,T]=i.useState(null),A=L();R(t=>{var s,c;return(c=(s=t==null?void 0:t.TranslationData)==null?void 0:s.data)==null?void 0:c.TranslationList}),i.useEffect(()=>{o()},[]);const o=()=>{},N=()=>r(!0),n=()=>r(!1),l=()=>d(!1),S=(t,s)=>{s===f.edit&&(C(t.contentId),A(F(t)),d(!0)),s===f.delete&&(T(t),D(!0))},I=[{dataField:"Action",caption:"Action",width:"10%",cellRender:t=>e.jsx("div",{"data-cname":"Action",children:e.jsx(V,{row:t==null?void 0:t.data,actions:b,buttonClick:S})})},{dataField:"screenName",caption:"Screen",width:"20%"},{dataField:"contentKey",caption:"Translation Key",width:"30%"},{dataField:"contentValue",caption:"Text (EN)",width:"20%"},{dataField:"languageCode",caption:"Language",width:"20%"}];return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Translation"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[e.jsx(v,{onClick:N,block:!0,variant:"solid",size:"sm",icon:e.jsx(O,{}),children:"Add Translation"}),e.jsx(u,{title:"Add Translation",isOpen:j,onClose:n,onRequestClose:n,portalClassName:"w30",children:e.jsx(p,{onDrawerClose:n,fetchData:o})}),e.jsx(u,{title:"Edit Translation",isOpen:w,onClose:l,onRequestClose:l,portalClassName:"w30",children:e.jsx(p,{categoryId:g,onDrawerClose:l,fetchData:o})})]})]})}),e.jsx(m,{className:"m-6 h-full py-4 px-6 bg-transparent",bodyClass:"h-full",children:e.jsx(m,{className:"p-4",children:e.jsx(M,{columns:I,tableName:"Translation-table",data:[],height:"calc(100vh - 280px)",defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:h,setSelectedRowId:x,setFilterValues:()=>{},filterValues:[],identity:"Translation-Listing",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"Translation-Listing-table",handleSearch:()=>{},isColumnResizing:!0,isPaginationReq:!0})})})]})};export{Ce as default};
