1import{r as s,j as e}from"./CgBZl8m0.production.bundle.min.js";import{B as m}from"./B7jgtT_H.production.bundle.min.js";import{e as h}from"./BFsIcxdk.production.bundle.min.js";import{u as b}from"./CUU-sqeu.production.bundle.min.js";import{F as I,G as A,H as L,I as S}from"./IggLV8Lk.production.bundle.min.js";import{L as w}from"./BkDLz1FT.production.bundle.min.js";import{u as _}from"./BWr4BVpJ.production.bundle.min.js";import"./BTOj8ijf.production.bundle.min.js";import"./CMxhj3GZ.production.bundle.min.js";import"./C7aKDdDU.production.bundle.min.js";import"./CJLuAe4t.production.bundle.min.js";import"./CHbJgqnE.production.bundle.min.js";import"./Dsqj8S3w.production.bundle.min.js";import"./9zG8c1d8.production.bundle.min.js";import"./DvJkqRNe.production.bundle.min.js";import"./vhNSgALD.production.bundle.min.js";import"./mPG1iAzk.production.bundle.min.js";import"./D9BowqIy.production.bundle.min.js";import"./M_FBjfQJ.production.bundle.min.js";import"./IimQW1M7.production.bundle.min.js";import"./DohGM9_I.production.bundle.min.js";import"./Czj00ZrM.production.bundle.min.js";import"./CRSxynHN.production.bundle.min.js";/* empty css */const ae=({onSuccess:r})=>{const[p,c]=s.useState(!1),[a,x]=s.useState(""),[i,u]=s.useState(""),[k,d]=s.useState(!1),[j,n]=s.useState(!1),[f,C]=s.useState(""),[N,g]=s.useState(null),l=b(),v=_(I);s.useEffect(()=>{l(A())},[l]);const E=()=>{const t=a.length<2,o=i.length<5;return d(t||o),!t&&!o},y=()=>{E()&&l(S({contactName:a,contactEmail:i},t=>{r&&typeof r=="function"&&r(),t||c(!1)}))},D=t=>{l(L({delete_id:t})),n(!1)};return e.jsxs(e.Fragment,{children:[e.jsx(w,{}),e.jsxs("div",{className:"middleware-data email-details contact-list-mw",children:[e.jsxs("section",{className:"top-section",children:[e.jsx("div",{className:"top-heading",children:e.jsx("p",{children:"Contacts"})}),e.jsxs("div",{className:"d-flex",children:[e.jsx("div",{className:"search-bar"}),e.jsx("div",{className:"email-button",children:e.jsx(m,{primary:!0,onClick:()=>c(!0),children:"Add New Contact"})})]})]}),e.jsx("section",{className:"view-contact",children:e.jsxs("table",{className:"head__sticky",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"NAME"}),e.jsx("th",{children:"EMAIL"}),e.jsx("th",{children:"CREATED AT"}),e.jsx("th",{children:"Actions"})]})}),e.jsx("tbody",{children:v.map((t,o)=>e.jsxs("tr",{children:[e.jsx("td",{children:t.name}),e.jsx("td",{children:t.email}),e.jsx("td",{children:t.created_at}),e.jsx("td",{children:e.jsx(m,{secondary:!0,onClick:()=>{n(!0),C(t.email),g(t.id)},children:"Delete"})})]},o))})]})}),e.jsxs(h,{isOpen:j,position:"center",overlayClassName:"user-delete-confirmation__dialog setting-confirmation-dialog detele",onClose:()=>n(!1),children:[e.jsxs("h4",{children:["Are you sure want to delete the Contact from MW list?"," ",e.jsx("b",{children:f})]}),e.jsxs("div",{className:"dialog-buttons-wrapper",children:[e.jsx("button",{className:"button is-simple",onClick:()=>n(!1),children:"Cancel"}),e.jsx("button",{className:"button is-scary",onClick:()=>D(N),children:"Delete"})]})]}),e.jsx(h,{isOpen:p,position:"right",overlayClassName:"contact-dailog",onClose:()=>c(!1),children:e.jsxs("div",{className:"contact_campaign",children:[e.jsx("h4",{children:"Add New Contact"}),e.jsxs("div",{className:"form",children:[e.jsx("input",{type:"text",placeholder:"Enter Name",value:a,onChange:t=>x(t.target.value),onKeyUp:()=>{a.length>0&&d(!1)}})," ",e.jsx("br",{}),e.jsx("input",{type:"text",placeholder:"Enter Email",value:i,onChange:t=>u(t.target.value),onKeyUp:()=>{i.length>0&&d(!1)}}),e.jsx(m,{primary:!0,onClick:y,children:"Save Contact"})]})]})})]})]})};export{ae as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.