(self.webpackChunksp_seller_dashboard_client=self.webpackChunksp_seller_dashboard_client||[]).push([[343],{42001:(e,a,t)=>{"use strict";t.d(a,{Z:()=>_});var o=t(67294),i=t(38765),n=t(55757),l=t(62265),d=t(72265),s=t(71893),r=t(89438),c=(0,s.F4)(["0%{opacity:0;}100%{opacity:1;}"]),p=(0,s.F4)(["0%{opacity:1;}100%{opacity:0;}"]),m=(0,s.F4)(["0%{transform:scale(1.05);}100%{transform:scale(1);}"]),h=(0,s.F4)(["0%{transform:scale(1);}100%{transform:scale(1.05);}"]),y=(0,r.Z)(),f=s.ZP.div.withConfig({displayName:"styles__ModalWrapper",componentId:"a15cay-0"})(["position:fixed;height:100%;width:100%;top:0;left:0;display:flex;align-items:center;justify-content:center;animation:"," 200ms ease-out;z-index:5;overflow:scroll;"],(e=>e.modalOpen?c:p)),x=s.ZP.div.withConfig({displayName:"styles__BackDrop",componentId:"a15cay-1"})(["position:fixed;height:100%;width:100%;background:",";"],(e=>"rgba(0,0,0,".concat(e.backdropOpacity,")"))),b=s.ZP.section.withConfig({displayName:"styles__Modal",componentId:"a15cay-2"})(["background:#fff;box-shadow:0 3px 5px -1px rgba(0,0,0,0.2),0 6px 10px 0 rgba(0,0,0,0.2),0 1px 18px 0 rgba(0,0,0,0.2);z-index:1;border-radius:5px;animation:"," 200ms ease-out;width:","px;"],(e=>e.modalOpen?m:h),(e=>{var{width:a}=e;return a||650})),g=s.ZP.header.withConfig({displayName:"styles__ModalHeader",componentId:"a15cay-3"})(["display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid ",";padding:",";h4{font-size:14px;font-weight:normal;margin:0;}.close_icon{cursor:pointer;}"],y.border.primary,(e=>e.hideFooter?"10px 20px":"20px")),w=(s.ZP.div.withConfig({displayName:"styles__Icon",componentId:"a15cay-4"})(["cursor:pointer;"]),s.ZP.section.withConfig({displayName:"styles__ModalBody",componentId:"a15cay-5"})(["max-height:550px;overflow:",";@media (max-height:600px){max-height:300px;}"],(e=>e.overflowVisible?"visible":"scroll"))),u=s.ZP.footer.withConfig({displayName:"styles__ModalFooter",componentId:"a15cay-6"})(["display:flex;align-items:center;justify-content:flex-end;padding:15px;border-top:1px solid ",";button{margin:0 5px;padding:6px 12px;}"],y.border.primary);const _=e=>{var{modalOpen:a,closeModal:t,children:s,title:r,disabled:c,handleSave:p,loading:m,actionText:h="Save",width:y,hideFooter:_=!1,hideHeader:C=!1,backdropOpacity:k=.7,hideCancel:v=!1,overflowVisible:E,testid:N="action"}=e,[Z,F]=(0,o.useState)(!1);(0,o.useEffect)((()=>{a&&F(!0)}),[a]);return Z&&o.createElement(f,{modalOpen:a,onAnimationEnd:()=>{a||F(!1)}},o.createElement(x,{backdropOpacity:k,onClick:t}),o.createElement(b,{modalOpen:a,width:y},!C&&o.createElement(g,{className:"modal-header",hideFooter:_},o.createElement("h4",{className:"modal-title"},r),o.createElement("span",{className:"close_icon",onClick:t},o.createElement(i.Z,{width:"12px"}))),o.createElement(w,{className:"modal-body-section",overflowVisible:E},s),!_&&o.createElement(u,null,!v&&o.createElement(n.ry,{type:"button",onClick:t},"Cancel"),o.createElement(l.f6,{type:"submit","data-testid":N,onClick:p,disabled:c||m},m?o.createElement(d.Z,null):h))))}}}]);