@tap-payments/os-micro-frontend-shared 0.3.151-test.1 → 0.3.151-test.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/_chunks/{chunk-ATGZW7EW.js → chunk-5MAT67T3.js} +1 -1
- package/build/_chunks/{chunk-ZM3U42HE.js → chunk-HOOZJ5FK.js} +1 -1
- package/build/_chunks/{chunk-SE2Y4QWD.js → chunk-OK6HCBL2.js} +1 -1
- package/build/_chunks/{chunk-2RXUTFJ2.js → chunk-QWPJYHVK.js} +1 -1
- package/build/_chunks/{chunk-BXKWTLZF.js → chunk-S2VISI6Z.js} +1 -1
- package/build/_chunks/{chunk-G3EN2K4T.js → chunk-ULE5G4WB.js} +1 -1
- package/build/_chunks/{chunk-UAK4RV3F.js → chunk-ZGLDEF2J.js} +1 -1
- package/build/components/AccountDropdown/index.js +1 -1
- package/build/components/ActionMenu/index.js +1 -1
- package/build/components/ActionsDropdownMenu/index.js +1 -1
- package/build/components/ActiveFilterChip/index.js +1 -1
- package/build/components/ActivityAreaChart/index.js +1 -1
- package/build/components/Amount/index.js +1 -1
- package/build/components/AmountConversionFilter/index.js +1 -1
- package/build/components/AmountInput/index.js +1 -1
- package/build/components/AmountSlider/index.js +1 -1
- package/build/components/AmountStatusChip/index.js +1 -1
- package/build/components/AnimatedSpinnerIcon/index.js +1 -1
- package/build/components/AppServices/index.js +1 -1
- package/build/components/AppServicesBar/index.js +1 -1
- package/build/components/AppWindowWrapper/index.js +1 -1
- package/build/components/AuthenticationTypeChip/index.js +1 -1
- package/build/components/Autocomplete/index.js +1 -1
- package/build/components/BetaBanner/index.js +1 -1
- package/build/components/BrandLogo/index.js +1 -1
- package/build/components/Button/index.js +1 -1
- package/build/components/Calender/index.js +1 -1
- package/build/components/CardEmptyState/index.js +1 -1
- package/build/components/Chip/index.js +1 -1
- package/build/components/ChipStack/index.js +1 -1
- package/build/components/CircularProgressWithLabel/index.js +1 -1
- package/build/components/Collapse/index.js +1 -1
- package/build/components/ColorPicker/index.js +1 -1
- package/build/components/ColumnViews/index.js +1 -1
- package/build/components/ConfirmDialog/index.js +1 -1
- package/build/components/CopyImage/index.js +1 -1
- package/build/components/CountryFilter/index.js +1 -1
- package/build/components/CountryFlag/index.js +1 -1
- package/build/components/CurrencyAmount/index.js +1 -1
- package/build/components/CurrencyFilter/index.js +1 -1
- package/build/components/CurrencySymbol/index.js +1 -1
- package/build/components/CustomBackdrop/index.js +1 -1
- package/build/components/Customer/index.js +1 -1
- package/build/components/DateFilter/index.js +1 -1
- package/build/components/DeviceIcon/index.js +1 -1
- package/build/components/Dialog/index.js +1 -1
- package/build/components/Discount/index.js +1 -1
- package/build/components/DisplayAmount/index.js +1 -1
- package/build/components/Dropdown2/index.js +1 -1
- package/build/components/DropdownButton/index.js +1 -1
- package/build/components/DropdownMenu/index.js +1 -1
- package/build/components/Error/index.js +1 -1
- package/build/components/ErrorToast/index.js +1 -1
- package/build/components/ExpandableSideBar/index.js +1 -1
- package/build/components/FieldFeedback/index.js +1 -1
- package/build/components/FileInputPreview/index.js +1 -1
- package/build/components/FilePreview/index.js +1 -1
- package/build/components/FileUpload/index.js +1 -1
- package/build/components/FileUploader/index.js +1 -1
- package/build/components/FilterDropdown/index.js +1 -1
- package/build/components/Filters/index.js +1 -1
- package/build/components/FlippingCard/index.js +1 -1
- package/build/components/HeatMap/index.js +1 -1
- package/build/components/IOSSwitch/index.js +1 -1
- package/build/components/Icon/index.js +1 -1
- package/build/components/IconWithBadge/index.js +1 -1
- package/build/components/Input/index.js +1 -1
- package/build/components/InputBase/index.js +1 -1
- package/build/components/InputNumber/index.js +1 -1
- package/build/components/Inputs/index.js +1 -1
- package/build/components/JSONViewer/index.js +1 -1
- package/build/components/LanguageDropdown/index.js +1 -1
- package/build/components/LeftPeekRightExpandingChip/index.js +1 -1
- package/build/components/ListColumnFilter/index.js +1 -1
- package/build/components/ListHeader/index.js +1 -1
- package/build/components/ListLayout/index.js +1 -1
- package/build/components/Loader/index.js +1 -1
- package/build/components/MFWidgetLoader/index.js +1 -1
- package/build/components/MaskedText/index.js +1 -1
- package/build/components/Menu/index.js +1 -1
- package/build/components/MenuItem/index.js +1 -1
- package/build/components/MerchantCurrencyDropdown/index.js +1 -1
- package/build/components/MerchantLogo/index.js +1 -1
- package/build/components/MerchantsDropdown/index.js +1 -1
- package/build/components/MultiSelectDropdownButton/index.js +1 -1
- package/build/components/MultiSelectWithSearch/index.js +1 -1
- package/build/components/NestedDropdown/index.js +1 -1
- package/build/components/NoInternet/index.js +1 -1
- package/build/components/OpenFileInNewTab/index.js +1 -1
- package/build/components/PartnersFilter/index.js +1 -1
- package/build/components/PaymentSourceFilter/index.js +1 -1
- package/build/components/PhoneFilter/index.js +1 -1
- package/build/components/ProgressRing/index.js +1 -1
- package/build/components/RFH/index.js +1 -1
- package/build/components/RadioGroup/index.js +1 -1
- package/build/components/RangeCalender/index.js +1 -1
- package/build/components/RatingCount/index.js +1 -1
- package/build/components/ReceiptsViewer/index.js +1 -1
- package/build/components/ReferenceTypeFilter/index.js +1 -1
- package/build/components/ResizableHeightInput/index.js +1 -1
- package/build/components/RightLeftExpandingCenterChip/index.js +1 -1
- package/build/components/SalesChannelFilter/index.js +1 -1
- package/build/components/ScrollLoader/index.js +1 -1
- package/build/components/SearchButton/index.js +1 -1
- package/build/components/SearchListInput/index.js +1 -1
- package/build/components/SelectDropdown/index.js +1 -1
- package/build/components/SelectWithSearch/index.js +1 -1
- package/build/components/Skeleton/index.js +1 -1
- package/build/components/Slider/index.js +1 -1
- package/build/components/StatusBar/index.js +1 -1
- package/build/components/StatusButton/index.js +1 -1
- package/build/components/StatusChip/index.js +1 -1
- package/build/components/StatusChipWithCopy/index.js +1 -1
- package/build/components/StatusFilter/index.js +1 -1
- package/build/components/StatusGroupChips/index.js +1 -1
- package/build/components/StatusIcons/index.js +1 -1
- package/build/components/StatusLabel/index.js +1 -1
- package/build/components/TableCells/index.js +1 -1
- package/build/components/TableReports/index.js +1 -1
- package/build/components/Timepicker/index.js +1 -1
- package/build/components/Toaster/index.js +1 -1
- package/build/components/ToggleView/index.js +1 -1
- package/build/components/Toolbar/index.js +1 -1
- package/build/components/ToolbarIcon/index.js +1 -1
- package/build/components/TooltipChip/index.js +1 -1
- package/build/components/TreeDropdown/index.js +1 -1
- package/build/components/VAT/index.js +1 -1
- package/build/components/VerificationIcon/index.js +1 -1
- package/build/components/ViewColumnRadioFilter/index.js +1 -1
- package/build/components/VirtualTables/index.js +1 -1
- package/build/components/Widget/index.js +1 -1
- package/build/components/Window/index.js +1 -1
- package/build/components/WindowAppIcon/index.js +1 -1
- package/build/components/WindowBackdrop/index.js +1 -1
- package/build/components/WindowSideBar/index.js +1 -1
- package/build/components/index.js +1 -1
- package/build/components/primitives/index.js +1 -1
- package/build/constants/index.js +1 -1
- package/build/hooks/index.js +1 -1
- package/build/index.js +1 -1
- package/build/types/custom/material-ui.d.ts +77 -0
- package/build/types/index.d.ts +1 -0
- package/build/types/index.js +1 -1
- package/build/utils/index.js +1 -1
- package/package.json +2 -2
- /package/build/_chunks/{chunk-VWSQS7GB.js → chunk-E7EO35R5.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import {f,b as b$1,g,a as a$3,e,d,c as c$1}from'./chunk-LDLGBNMM.js';import {a as a$5}from'./chunk-UJ4IYIJH.js';import {a as a$2}from'./chunk-H6HHXYRL.js';import {c}from'./chunk-4XDOS6NM.js';import {a as a$1}from'./chunk-ZONDSLTR.js';import {o,j as j$1,k,l,p}from'./chunk-RHUTFOWS.js';import {a}from'./chunk-KHM5KW53.js';import {a as a$4}from'./chunk-4DSO4G5S.js';import {z}from'./chunk-UOP57G76.js';import {b}from'./chunk-2U6YCW6N.js';import {Va,yc,Ha,Ia,bc,f as f$1}from'./chunk-2CIV4TII.js';import {s}from'./chunk-BXMBE224.js';import {U,ui,wi,vi,ti,Ai,_g,Rg,Zg,Nj,Oj,ub,ck,fk,wk,dk,vb,wa,va,ok,h,Qg}from'./chunk-KCEYICHJ.js';import {useId,useMemo,useCallback}from'react';import {useTranslation}from'react-i18next';import {styled,Box,useTheme}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {motion}from'framer-motion';import {styled as styled$1,useTheme as useTheme$1}from'@mui/material/styles';import _ from'lodash/camelCase';import Qe from'@mui/material/Box';var lt={ORDER:{label:"order",icon:ti,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:vi,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:wi,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:ui,color:"#32ADE6"}},dt={SAVED_TOKEN:{label:"savedToken",icon:U,color:"#76BB40"},COUNT:{label:"countBadge",icon:"countBadge",color:"#76BB40"}};styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5)}));styled("img")(()=>({width:"35px",height:"16px",display:"block"}));styled("span")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"14.67px",height:"10px"}));styled("img")(()=>({maxWidth:"100%",width:"100%"}));var ct=styled("span")(({theme:t})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:t.palette.text.primary})),mt=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px"}));function Ie({type:t,hasSavedCard:o,totalPaymentsCount:e,isTextShown:r}){let l=yc(useId(),"agreement-icon"),p=useTheme(),{t:a$3}=useTranslation(),n=useMemo(()=>[...o?[dt.SAVED_TOKEN]:[],...(e||0)>0?[dt.COUNT]:[],...t&<[t]?[lt[t]]:[]],[o,e,t]),d=c=>r?jsx(a$1,{"data-testid":"AgreementCell_countBadge",children:jsx(a,{title:a$3("totalPaymentCount",{amount:f$1(e)}),children:jsx(mt,{children:jsxs(ct,{"data-testid":"AgreementCell_totalPaymentsCount",sx:{color:dt.COUNT.color},children:["x",e]})})})},c):jsx(a$5,{value:e,index:c},c),s=n.map((c,g)=>c.label==="countBadge"?d(g):jsx(a,{title:a$3(c.label),children:jsx(a$1,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:c.color},children:a$3(c.label)})}):jsx(a$2,{sx:{maxWidth:"16px",maxHeight:"16px",height:"auto",width:"auto"},src:c.icon,alt:"agreement"})},c.color)},c.color)),f=jsx(a,{title:"No agreement",children:jsx(a$1,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:p.palette.text.secondary},children:"No agreement"})}):jsx(a$2,{sx:{maxWidth:"24px",maxHeight:"24px",height:"auto",width:"auto"},src:Ai,alt:"agreement"})},"no-agreement")},"no-agreement");return jsx(Box,{id:l,"data-testid":"AgreementIcon",sx:{display:"flex",alignItems:"center",gap:"4px"},children:s?.length>0?s:f})}var To=Ie;var Ce=To;styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));styled("img")(()=>({maxWidth:"36px",maxHeight:"24px"}));styled(motion.span,{shouldForwardProp:t=>t!=="sourcesCount"})(({theme:t,sourcesCount:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${o*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:t.palette.background.paper,borderRadius:"16px"}));var Ao=styled("span")(({theme:t})=>({fontSize:"11px",padding:"2px 0",color:t.palette.text.primary})),Po=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px",textAlign:"center",width:"100%"}));styled("span")(({theme:t})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));styled(motion.div)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));var Wo=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px"}));var kt={"3DS":{tooltip:"3DS",icon:Oj,borderColor:"rgba(31, 136, 208, 0.10)"},"Device Biometric":{tooltip:"Biometric",icon:Nj,borderColor:"rgba(31, 136, 208, 0.10)"},"Non-3DS":{tooltip:"Non 3DS",icon:Zg,borderColor:"rgba(31, 136, 208, 0.10)"}},vo={FAILED:{tooltip:"Failed",icon:Rg,borderColor:"rgba(255, 61, 0, 0.10)"},REJECTED:{tooltip:"Rejected",icon:_g,borderColor:"rgba(255, 61, 0, 0.10)"}};function be({transactionStatus:t,eci:o,authType:e,isTextShown:r}){let l=yc(useId(),"auth-icons"),p=useMemo(()=>{let n=t?vo[t]:null,d=n?.tooltip,s=t==="AUTHENTICATED"?null:n?.icon;return [{tooltip:d,content:r?d:s,type:r?"text":"icon"},...e?[{tooltip:e,content:r?kt[e]?.tooltip:kt[e]?.icon,type:r?"text":"icon"}]:[],{tooltip:"",content:o?`ECI ${o}`:"",type:"text"}]},[t,r,e,o]),a$1=useMemo(()=>p.filter(n=>!!n.content).map((n,d)=>{let s=n.type==="text"?jsx(Po,{"data-testid":"AuthenticationCell_BadgeTextWrapper",children:jsx(Ao,{sx:{border:"none"},"data-testid":"AuthenticationCell_TextLabel","data-source":n.content,children:n.content})}):jsx(a$2,{sx:{width:"16px",height:"16px"},src:n.content,alt:n.tooltip});return jsx(a,{title:n.tooltip,children:s},`${n.tooltip}-${d}`)}),[p]);return jsx(Wo,{id:l,"data-testid":"AuthIcons",children:a$1})}var ko=be;var Se=(t,o,e)=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"},...t>0&&{opacity:0}},animate:{x:e?t*e:t*39,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:o,...t>0&&{opacity:1}}});var Te=ko;var tt={VOID:{icon:dk},CAPTURED:{icon:ck}};var ut=styled$1(motion.div)(({theme:t,isCapture:o})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:t.spacing(.5),paddingInline:t.spacing(.3),paddingBlock:t.spacing(.3),height:"100%",minWidth:"100%",backgroundColor:o?"#eaf3fb":"#eeeeee",borderRadius:"56px",width:"fit-content",fontSize:"10px",color:t.palette.text.primary,position:"relative",zIndex:10})),ft=styled$1("div")(({theme:t,percentage:o,isCapture:e})=>({border:`0.6px ${[0,100].includes(o)?"solid":"dashed"} ${e?t.palette.info.dark:"#656565"}`,borderRadius:"80px",padding:t.spacing(.316),paddingLeft:t.spacing(.516),fontSize:"7px",fontWeight:t.typography.fontWeightBold,color:e?t.palette.info.dark:"#656565",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5)})),xt=styled$1("div")(({percentage:t,isCapture:o,theme:e})=>({background:`conic-gradient(${o?e.palette.info.dark:"#656565"} ${t}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${o?e.palette.info.dark:"#656565"}`})),gt=styled$1("img")({width:"14px",height:"14px"}),j=styled$1(o)({width:"16px",height:"16px"}),N=styled$1("img")({width:"16px",height:"16px"}),Bo=styled$1(Box)({display:"flex",alignItems:"center",justifyContent:"center"});function It(t){return t<5?5:t===100?95:t}function Be({voidPercentage:t,capturePercentage:o,captureCount:e,autoType:r,captureAmount:l,voidAmount:p,currency:a$1,isTextShown:n,remainingAmount:d,isSheetViewShown:s,selectionProps:f={}}){let c=Number(o)+Number(t)===100||d<=0,g=yc(useId(),"capture-auto-icon"),T=useTheme$1(),{t:A}=useTranslation(),P=Ha(d||0),L=useCallback(C=>`Auto ${C} - ${a$1} ${P.integerAmount}.${P.decimalAmount}`,[a$1,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l:p,{integerAmount:D,decimalAmount:v}=Ia(X,a$1);return `Partial ${C} - ${a$1} ${D}.${v}`},[l,p,a$1]),x=o>0?jsx(a,{title:J("Capture"),children:jsxs(ut,{isCapture:true,isFullyUsed:c,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:T.shadows[4]}},children:[jsx(gt,{src:ub,alt:"captured"}),jsxs(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px"},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:[jsxs(ft,{isCapture:true,percentage:o,children:[o,"% ",jsx(xt,{isCapture:true,percentage:It(o)})]}),e>1&&jsxs(z,{compact:true,color:"dark",children:[e,"x"]})]})]})}):r==="CAPTURED"&&!c?jsx(a,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}):jsx(a,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}),I=o===100?jsx(a,{title:A("captured"),children:jsx(Bo,{children:jsx(N,{src:fk,alt:"captured"})})}):x,W=useMemo(()=>s&&I?jsx(b,{chipIndex:4,copyText:A("captured"),selectionProps:f,children:A("captured")}):n&&I?jsx(k,{children:A("captured")}):I,[n,I,s,f]);return W&&jsx("div",{id:g,"data-testid":"CaptureAutoIcon",style:{zIndex:12},children:W})}var Do=Be;function Ve({voidPercentage:t,capturePercentage:o,voidCount:e,autoType:r,captureAmount:l$1,voidAmount:p,currency:a$1,isTextShown:n,isSheetViewShown:d,selectionProps:s={},remainingAmount:f}){let c=Number(o)+Number(t)===100||f<=0,g=yc(useId(),"void-auto-icon"),T=useTheme$1(),{t:A}=useTranslation(),P=Ha(f||0),L=useCallback(C=>`Auto ${C} - ${a$1} ${P.integerAmount}.${P.decimalAmount}`,[a$1,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l$1:p,{integerAmount:D,decimalAmount:v}=Ia(X,a$1);return `Partial ${C} - ${a$1} ${D}.${v}`},[l$1,p,a$1]),x=t>0||p?jsx(a,{title:J("Void"),children:jsxs(ut,{isFullyUsed:c,whileHover:["animate","fadeIn"],animate:"start",sx:{zIndex:14,background:T.palette.common.white,border:`0.75px solid ${T.palette.grey[600]}1A`},variants:{animate:{boxShadow:T.shadows[4]}},children:[jsx(gt,{src:wk,alt:"void"}),jsxs(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px"},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:[jsxs(ft,{percentage:t,children:[t,"% ",jsx(xt,{percentage:It(t)})]}),e>0&&jsxs(z,{compact:true,color:"neutral",children:[e,"x"]})]})]})}):r==="VOID"&&!c?jsx(a,{title:L("Void"),children:jsx(j,{children:jsx(N,{src:tt.VOID?.icon,alt:"auto"})})}):null,I=t===100?jsx(a,{title:A("void"),children:jsx(j,{children:jsx(N,{src:wk,alt:"void"})})}):x,W=useMemo(()=>d&&I?jsx(b,{chipIndex:5,copyText:A("void"),selectionProps:s,children:A("void")}):n&&I?jsx(l,{children:A("void")}):I,[n,I,d,s]);return W?jsx("div",{id:g,"data-testid":"VoidAutoIcon",style:{...!d&&{zIndex:11}},children:W}):null}var $o=Ve;var Me=Do;var Fe=({authorizedStatus:t,isTextShown:o,iconStyles:e,tableMode:r,chipIndex:l=0,selectionProps:p={}})=>{let{t:a$1}=useTranslation(),n=useTheme$1(),d=a$1(_(t));return Va(r)?jsx(b,{copyText:d,chipIndex:l,selectionProps:p,children:d}):jsx(a,{title:d,children:o?jsx(j$1,{"data-testid":"StatusCell_AuthorizedStatusLabel",sx:{color:n.palette.info.dark},children:d}):jsx(a$2,{src:f[t],alt:"authorized-icon","data-testid":"StatusCell_AuthorizedStatusIcon",sx:e})})};var _o=styled$1(motion.span)(({theme:t})=>({color:t.palette.common.white,display:"block",fontWeight:t.typography.fontWeightBold,fontSize:"9.78px",borderRadius:"4px",paddingInline:t.spacing(.45)})),Vo=styled$1(motion.span)(()=>({display:"block",width:"0",overflow:"hidden"})),Bt=styled$1("img")(()=>({width:"10px",height:"10px"})),Lt=styled$1(motion.span)(({theme:t})=>({width:"18px",height:"18px",borderRadius:"50%",backgroundColor:t.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"relative"})),Dt=styled$1(motion.div,{shouldForwardProp:t=>t!=="isVisible"})(({isVisible:t})=>({display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",width:"0",overflow:"hidden",opacity:0,...!t&&{padding:"0 !important"}})),Mo=styled$1(motion.div)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start"})),zo=styled$1(motion.span)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minHeight:"24px",cursor:"pointer",borderRadius:"16px"})),No={delay:.2,ease:"easeIn",fadeIn:{duration:.2}},Go={animate:{width:"auto",paddingRight:"4px",paddingLeft:"4px"},fadeIn:{opacity:1,transition:{delay:.7}}},Fo={animate:{width:"auto"},fadeIn:{opacity:1,transition:{delay:1}}},Uo={animate:{width:"auto",paddingRight:"8px",paddingLeft:"4px"}},Et={fadeIn:{duration:.3},animate:{duration:.1}},Oo={fadeIn:{opacity:1}},jo=styled$1(j$1)(()=>({width:"88px",height:"100%"})),$t=styled$1(Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.25),height:"100%"}));function qe({chargeStatus:t,gatewayTooltip:o$1,acquirerTooltip:e,chargeTooltip:r,errorCode:l,isTextShown:p$1,gatewayCode:a$1,acquirerCode:n,unCapturedStyles:d,iconStyles:s$1,iconWrapperStyles:f,gatewayIconWrapperStyles:c,gatewayContainerStyles:g$1,gateWayIconStyles:T,showBadge:A=true,isSheetViewShown:P=false,selectionProps:L={},chipIndex:J=0}){let x=t?b$1[t]:null,I=t?g[t]:null,W=useTheme$1(),{t:C}=useTranslation(),X=yc(useId(),"charge-status-icon"),D=r&&jsx(Fragment,{children:jsx("div",{children:r})}),v=e&&jsxs(Fragment,{children:[jsx("div",{children:"Acquirer"}),jsx("div",{children:e})]}),Y=o$1&&jsxs(Fragment,{children:[jsx("div",{children:"Gateway"}),jsx("div",{children:o$1})]}),Ft=t&&a$3[t]&&jsx("div",{"data-testid":"ChargeStatusIcon_ChargeIcon",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",borderRadius:x?"50%":"",...f},children:jsx(p,{src:a$3[t],alt:"charge-icon","data-testid":"ChargeStatusIcon_StatusIcon",style:{borderRadius:x?"50%":"",width:"16px",height:"16px",...s$1}})});return P?jsxs($t,{children:[jsxs(b,{copyText:C(_(t)),chipIndex:J,selectionProps:L,children:[C(_(t))," ",l]}),x&&jsxs(Fragment,{children:[a$1&&jsxs(b,{copyText:"Gateway",chipIndex:1,selectionProps:L,children:["Gateway ",a$1]}),n&&jsxs(b,{copyText:"Acquirer",chipIndex:2,selectionProps:L,children:["Acquirer ",n]})]})]}):p$1?jsxs($t,{children:[jsx(a,{title:D,children:jsxs(jo,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark,borderColor:`${x?.color||I?.color||W.palette.info.dark}1A`},children:[C(_(t))," ",l]})}),x&&jsxs(Fragment,{children:[a$1&&jsx(a,{title:Y,children:jsxs(j$1,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark},children:["Gateway ",a$1]})}),n&&jsx(a,{title:v,children:jsxs(j$1,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark},children:["Acquirer ",n]})})]})]}):jsx(o,{id:X,"data-testid":"ChargeStatusIcon_StatusIconWrapper",style:{...f},children:s?.includes(t||"")&&(D||v||Y)?jsxs(zo,{"data-testid":"ChargeStatusIcon_UnCapturedContainer",whileHover:["animate","fadeIn"],style:{left:"0",...A&&{paddingInline:"12px",border:"1px solid #F2F2F2",borderRadius:"12px",backgroundColor:"#fff"},...d},children:[jsx(Mo,{"data-testid":"ChargeStatusIcon_UnCapturedBadge",sx:{borderRadius:"56px"},initial:{background:"transparent"},variants:{animate:{background:x?.background}},children:jsx(a,{title:D??C(_(t)),children:jsxs(Fragment,{children:[Ft,jsx(Vo,{"data-testid":"ChargeStatusIcon_ErrorCodeWrapper",transition:{animate:{duration:.05}},variants:Uo,style:{...l&&{padding:"0 !important"}},children:jsx(_o,{"data-testid":"ChargeStatusIcon_ErrorCodeLabel",sx:{background:x?.color},transition:No,variants:Oo,initial:{opacity:0},children:l})})]})})}),jsx(Dt,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:Et,variants:Go,style:g$1,isVisible:!!Y,children:Y&&jsx(a,{title:Y,children:jsx(Lt,{"data-testid":"ChargeStatusIcon_GatewayIconWrapper",style:{background:x?.background,...c},children:jsx(Bt,{src:x?.gatewayIcon,alt:"gateway-icon","data-testid":"ChargeStatusIcon_GatewayIcon",style:T})})})}),jsx(Dt,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:Et,variants:Fo,style:g$1,isVisible:!!v,children:v&&jsx(a,{title:v,children:jsx(Lt,{"data-testid":"ChargeStatusIcon_AcquirerIconWrapper",style:{background:x?.background,...c},children:jsx(Bt,{src:x?.acquirerIcon,alt:"acquirer-icon","data-testid":"ChargeStatusIcon_AcquirerIcon",style:T})})})})]}):jsx(a,{title:D??C(_(t)),children:jsx(o,{children:Ft})})})}var Xe=()=>{let{t}=useTranslation(),o=yc(useId(),"customer-initiated-icon");return jsx(a,{title:t("merchantInitiated"),children:jsx("img",{id:o,"data-testid":"merchantInitiatedIcon",src:vb,alt:"merchant",style:{width:"16px",height:"16px"}})})};var Ye={G:"Global",R:"Regional",L:"Local"},ot=({geographyVariant:t,countryCode:o,isTextShown:e})=>{let r=t?Ye[t]:void 0,l=r||o?`${r||""} ${r&&o?"-":""} ${o?`Country - ${o}`:""}`:void 0;return e||!o?null:jsx(a,{title:l,children:jsx(a$4,{countryCode:o})})};var tr=({geographyVariant:t,isTextShown:o,deviceCountry:e,deviceType:r,tableMode:l})=>{let p=yc(useId(),"device-icon-chip");return jsxs(Qe,{id:p,"data-testid":"DeviceIconChip",sx:{display:"flex",gap:"8px",alignItems:"center",...Va(l)&&{height:"18px"}},children:[jsx(ot,{geographyVariant:t,isTextShown:o,countryCode:e}),jsx(c,{type:r,isTextShown:o,tableMode:l})]})};var rr=({isDisputeOpen:t,iconStyles:o})=>{let e=yc(useId(),"dispute-icon");return jsx(p,{id:e,"data-testid":"StatusCell_DisputeStatusIcon",sx:{width:"13.5px",height:"13.5px"},src:t?wa:va,alt:"dispute-icon",style:o})};var Xo=styled$1(Qe,{shouldForwardProp:t=>t!=="tableMode"})(({theme:t,tableMode:o})=>({display:"flex",gap:t.spacing(.5),...Va(o)&&{height:"18px"},alignItems:"center"})),Yo=styled$1("span")(({theme:t})=>({fontSize:"10px",fontWeight:500,color:t.palette.text.primary}));function Vt({countryCode:t,isTextShown:o,cardNumber:e,bankName:r,tableMode:l}){let p=yc(useId(),"issuer-icon"),a$1=e?.slice(0,4),n=e?.slice(-4);return jsxs(Xo,{id:p,"data-testid":"IssuerIcon",tableMode:l,children:[t&&jsx(ot,{countryCode:t,isTextShown:o}),jsx(a,{title:`${r?`Issuer - ${r}`:""}`,children:jsx(Yo,{children:`${a$1||""} ${n||""}`})})]})}var sr=Vt;styled(motion.div)(({theme:t,background:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5),paddingInline:t.spacing(.75),paddingBlock:t.spacing(.5),backgroundColor:o,height:"24px",width:"fit-content",borderRadius:"24px",fontSize:"10px",color:t.palette.text.primary}));var Ra=styled("img")(()=>({height:"13.125px",width:"12px"})),bt=styled("div")(()=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",width:"65px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4.5px 8px",borderRadius:"24px"})),ka=styled("div")(({theme:t})=>({color:t.palette.common.white,background:t.palette.error.main,fontSize:"0.6rem",fontWeight:600,borderRadius:"16px",padding:"2px 8px",display:"flex",alignItems:"center",justifyContent:"center"})),Ba=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px"}));var ur=({payoutStatus:t="PENDING",isTextShown:o,payoutTooltip:e$1,iconStyles:r,isSheetViewShown:l,chipIndex:p$1=0,selectionProps:a$1={}})=>{let{t:n}=useTranslation(),d=yc(useId(),"payout-icon"),s=n(_(t)),f=e$1||s;return l?jsx(b,{chipIndex:p$1,copyText:s,selectionProps:a$1,children:s}):jsx(a,{title:f,children:o?jsx(bt,{id:d,"data-testid":"StatusCell_PayoutStatusLabel",children:s}):jsx(p,{id:d,src:e[t],alt:"settled-icon","data-testid":"StatusCell_PayoutStatusIcon",style:r})})};var Qo=styled$1(motion.img)(()=>({width:"14px",height:"14px"})),Zo=styled$1(motion.span)(({theme:t})=>({color:t.palette.common.white,borderRadius:t.spacing(.5),height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600,backgroundColor:t.palette.secondary.main})),Mt=styled$1(motion.div)(({theme:t})=>({height:"16px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:`${t.palette.secondary.main}1A`,paddingInline:t.spacing(.5),borderRadius:"56px"})),qa=(t,o,e)=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:e?t*e:t*49,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:o}}),Ka=styled$1(motion.span)(({isTextShown:t,theme:o})=>({border:`1px solid ${o.palette.divider}`,borderRadius:"12px",backgroundColor:o.palette.background.paper,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",minWidth:t?"auto":"36px",...t&&{border:"none"}})),Ja=styled$1(motion.div,{shouldForwardProp:t=>t!=="order"})(({order:t=0})=>({display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:0,left:0,zIndex:t+6,width:"fit-content",height:"24px",cursor:"pointer",borderRadius:"16px","&:hover":{zIndex:200}})),Xa=styled$1(motion.div,{shouldForwardProp:t=>t!=="statusesCount"})(({statusesCount:t=1})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",minWidth:`${t*6+36}px`,height:"24px",cursor:"pointer",borderRadius:"16px",overflow:"visible"})),Ya=styled$1("div")(()=>({display:"flex",gap:"4px",justifyContent:"flex-start",alignItems:"center",position:"relative",width:"100%",overflow:"visible"}));var hr=({isTextShown:t,refundStatus:o="PENDING",refundTooltip:e="",refundCount:r,iconStyles:l,isSheetViewShown:p$1,chipIndex:a$1=0,selectionProps:n={}})=>{let{t:d$1}=useTranslation(),s=useTheme$1(),f=yc(useId(),"refund-icon"),c=(r||0)>1,g=d$1(_(o));if(p$1)return jsxs(b,{chipIndex:a$1,selectionProps:n,copyText:g,children:[g," ",c?`${r}x`:null]});let T=jsxs(Zo,{"data-testid":"StatusCell_RefundsCountBadge",initial:{width:0,opacity:0,padding:"0px"},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex",padding:"1.285px 2.569px"},fadeIn:{transition:{delay:.5},opacity:1}},children:[r,"x"]});return t?jsx(a,{title:jsx("div",{children:jsx("div",{children:e})}),children:jsx(bt,{id:f,"data-testid":"StatusCell_RefundStatusLabel",sx:{color:d[o].color,backgroundColor:d[o].backgroundColor,width:"90px"},children:jsxs(Mt,{whileInView:c?["animate","fadeIn"]:void 0,variants:{animate:{boxShadow:s.shadows[4],gap:s.spacing(.5)}},children:[g," ",c?T:null]})})}):jsx(a,{title:jsx("div",{children:jsx("div",{children:e})}),children:c?jsxs(Mt,{id:f,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:s.shadows[4],gap:s.spacing(.5)}},children:[jsx(Qo,{src:ok,alt:"multi-refunded-icon","data-testid":"StatusCell_MultiRefundIcon"}),T]}):jsx(p,{id:f,src:c$1[o],alt:"refunded-icon","data-testid":"StatusCell_RefundStatusIcon",style:l})})},te=hr;var Cr=te;var yr={american_express:"AMEX",debit:"card",credit:"card",unionpay:"UnionPay",jaywan:"JAYWAN"},B=t=>yr[t?.toLowerCase()||""]||t;styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));var oe=styled("img")(()=>({maxWidth:"24px",maxHeight:"16px"}));styled(motion.span,{shouldForwardProp:t=>t!=="sourcesCount"})(({theme:t,sourcesCount:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${o*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:t.palette.background.paper,borderRadius:"16px"}));var ee=styled("span")(({theme:t})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:t.palette.text.primary})),re=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px",textAlign:"center",width:"100%"}));styled("span")(({theme:t})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));var ne=styled("span")(({theme:t})=>({fontSize:"10px",fontWeight:500,color:t.palette.text.primary}));function At({source:t,isTextShown:o,title:e,width:r,height:l,imgSx:p}){let{t:a$1}=useTranslation(),n=h(t);return jsx(a,{title:e,children:o?jsx(re,{"data-testid":"SourceCell_BadgeTextWrapper",children:jsx(ee,{"data-testid":"SourceCell_TextLabel","data-source":t,children:a$1(_(t))})}):jsx(oe,{src:n,alt:t,width:r,height:l,onError:d=>{d.currentTarget.src=h("card");},sx:p})})}function vr({payment:t,card:o,isTextShown:e,firstIcon:r}){let l=yc(useId(),"source-icons"),{t:p}=useTranslation(),a=useCallback(()=>{let s=[],f=bc(t),c=t?.method,g=t?.scheme;return B(c)?.toLowerCase()===B(g)?.toLowerCase()?s.push(B(c),B(f)):s.push(B(c),B(f),B(g)),s},[t]),n=useMemo(()=>jsx(At,{source:r,isTextShown:e,title:p(_(r))},r),[r,e,p]),d=useMemo(()=>a()?.filter(s=>!!s&&s!==r)?.map((s,f,c)=>{let g=t?.wallet===p("sv_wallet")?p("storedValueWallet"):p("passThruWallet"),T=f===c.length-1&&o?.last_four?`${p(_(s))} - ${o?.last_four}`:p(_(s));return jsx(At,{source:s,isTextShown:e,title:f===0&&s==="Wallet"?g:T},`${s}-${f}`)}),[a,t,o,e,p,r]);return jsxs(Box,{id:l,"data-testid":"SourceIcons",display:"flex",alignItems:"center",gap:.5,children:[r&&n,d,o?.last_four&&jsxs(ne,{children:["\xB7\xB7\xB7 ",o?.last_four]})]})}var rt={PROCESSED:Qg,FAILED:""};var se=styled("span")(({theme:t})=>({fontSize:"11px",padding:"2px 0",color:t.palette.text.primary})),le=styled("img")(()=>({width:"16px",height:"16px"})),de=styled("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}));function ce({status:t,isTextShown:o,isSheetViewShown:e,chipIndex:r=0,selectionProps:l={}}){let p=useTheme(),{t:a$1}=useTranslation(),n=yc(useId(),"destination-icon"),d=a$1(_(t));return e&&rt[t]?jsx(b,{copyText:d,chipIndex:r,selectionProps:l,children:d}):o&&rt[t]?jsx(se,{id:n,"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:"#1F88D00D",color:t==="PROCESSED"?p.palette.info.dark:p.palette.common.black},children:d}):jsx(de,{id:n,"data-testid":"DestinationIcon",className:"destination-status",children:t&&rt[t]&&jsx(a,{title:a$1(_(t)),children:jsx(le,{src:rt[t],alt:"destination-icon"})})})}export{qa as a,Ka as b,Ja as c,Xa as d,Ya as e,Ce as f,Se as g,Te as h,$o as i,Me as j,Fe as k,qe as l,Xe as m,ot as n,tr as o,rr as p,sr as q,Ra as r,ka as s,Ba as t,ur as u,Cr as v,B as w,At as x,vr as y,ce as z};
|
|
1
|
+
import {f,b as b$1,g,a as a$3,e,d,c as c$1}from'./chunk-LDLGBNMM.js';import {a as a$5}from'./chunk-UJ4IYIJH.js';import {a as a$2}from'./chunk-H6HHXYRL.js';import {c}from'./chunk-4XDOS6NM.js';import {a as a$1}from'./chunk-ZONDSLTR.js';import {o,j as j$1,k,l,p}from'./chunk-RHUTFOWS.js';import {a}from'./chunk-KHM5KW53.js';import {b}from'./chunk-2U6YCW6N.js';import {z}from'./chunk-UOP57G76.js';import {a as a$4}from'./chunk-4DSO4G5S.js';import {Va,yc,Ha,Ia,bc,f as f$1}from'./chunk-2CIV4TII.js';import {s}from'./chunk-BXMBE224.js';import {U,ui,wi,vi,ti,Ai,_g,Rg,Zg,Nj,Oj,ub,ck,fk,wk,dk,vb,wa,va,ok,h,Qg}from'./chunk-KCEYICHJ.js';import {useId,useMemo,useCallback}from'react';import {useTranslation}from'react-i18next';import {styled,Box,useTheme}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {motion}from'framer-motion';import {styled as styled$1,useTheme as useTheme$1}from'@mui/material/styles';import _ from'lodash/camelCase';import Qe from'@mui/material/Box';var lt={ORDER:{label:"order",icon:ti,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:vi,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:wi,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:ui,color:"#32ADE6"}},dt={SAVED_TOKEN:{label:"savedToken",icon:U,color:"#76BB40"},COUNT:{label:"countBadge",icon:"countBadge",color:"#76BB40"}};styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5)}));styled("img")(()=>({width:"35px",height:"16px",display:"block"}));styled("span")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"14.67px",height:"10px"}));styled("img")(()=>({maxWidth:"100%",width:"100%"}));var ct=styled("span")(({theme:t})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:t.palette.text.primary})),mt=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px"}));function Ie({type:t,hasSavedCard:o,totalPaymentsCount:e,isTextShown:r}){let l=yc(useId(),"agreement-icon"),p=useTheme(),{t:a$3}=useTranslation(),n=useMemo(()=>[...o?[dt.SAVED_TOKEN]:[],...(e||0)>0?[dt.COUNT]:[],...t&<[t]?[lt[t]]:[]],[o,e,t]),d=c=>r?jsx(a$1,{"data-testid":"AgreementCell_countBadge",children:jsx(a,{title:a$3("totalPaymentCount",{amount:f$1(e)}),children:jsx(mt,{children:jsxs(ct,{"data-testid":"AgreementCell_totalPaymentsCount",sx:{color:dt.COUNT.color},children:["x",e]})})})},c):jsx(a$5,{value:e,index:c},c),s=n.map((c,g)=>c.label==="countBadge"?d(g):jsx(a,{title:a$3(c.label),children:jsx(a$1,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:c.color},children:a$3(c.label)})}):jsx(a$2,{sx:{maxWidth:"16px",maxHeight:"16px",height:"auto",width:"auto"},src:c.icon,alt:"agreement"})},c.color)},c.color)),f=jsx(a,{title:"No agreement",children:jsx(a$1,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:p.palette.text.secondary},children:"No agreement"})}):jsx(a$2,{sx:{maxWidth:"24px",maxHeight:"24px",height:"auto",width:"auto"},src:Ai,alt:"agreement"})},"no-agreement")},"no-agreement");return jsx(Box,{id:l,"data-testid":"AgreementIcon",sx:{display:"flex",alignItems:"center",gap:"4px"},children:s?.length>0?s:f})}var To=Ie;var Ce=To;styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));styled("img")(()=>({maxWidth:"36px",maxHeight:"24px"}));styled(motion.span,{shouldForwardProp:t=>t!=="sourcesCount"})(({theme:t,sourcesCount:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${o*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:t.palette.background.paper,borderRadius:"16px"}));var Ao=styled("span")(({theme:t})=>({fontSize:"11px",padding:"2px 0",color:t.palette.text.primary})),Po=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px",textAlign:"center",width:"100%"}));styled("span")(({theme:t})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));styled(motion.div)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));var Wo=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px"}));var kt={"3DS":{tooltip:"3DS",icon:Oj,borderColor:"rgba(31, 136, 208, 0.10)"},"Device Biometric":{tooltip:"Biometric",icon:Nj,borderColor:"rgba(31, 136, 208, 0.10)"},"Non-3DS":{tooltip:"Non 3DS",icon:Zg,borderColor:"rgba(31, 136, 208, 0.10)"}},vo={FAILED:{tooltip:"Failed",icon:Rg,borderColor:"rgba(255, 61, 0, 0.10)"},REJECTED:{tooltip:"Rejected",icon:_g,borderColor:"rgba(255, 61, 0, 0.10)"}};function be({transactionStatus:t,eci:o,authType:e,isTextShown:r}){let l=yc(useId(),"auth-icons"),p=useMemo(()=>{let n=t?vo[t]:null,d=n?.tooltip,s=t==="AUTHENTICATED"?null:n?.icon;return [{tooltip:d,content:r?d:s,type:r?"text":"icon"},...e?[{tooltip:e,content:r?kt[e]?.tooltip:kt[e]?.icon,type:r?"text":"icon"}]:[],{tooltip:"",content:o?`ECI ${o}`:"",type:"text"}]},[t,r,e,o]),a$1=useMemo(()=>p.filter(n=>!!n.content).map((n,d)=>{let s=n.type==="text"?jsx(Po,{"data-testid":"AuthenticationCell_BadgeTextWrapper",children:jsx(Ao,{sx:{border:"none"},"data-testid":"AuthenticationCell_TextLabel","data-source":n.content,children:n.content})}):jsx(a$2,{sx:{width:"16px",height:"16px"},src:n.content,alt:n.tooltip});return jsx(a,{title:n.tooltip,children:s},`${n.tooltip}-${d}`)}),[p]);return jsx(Wo,{id:l,"data-testid":"AuthIcons",children:a$1})}var ko=be;var Se=(t,o,e)=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"},...t>0&&{opacity:0}},animate:{x:e?t*e:t*39,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:o,...t>0&&{opacity:1}}});var Te=ko;var tt={VOID:{icon:dk},CAPTURED:{icon:ck}};var ut=styled$1(motion.div)(({theme:t,isCapture:o})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:t.spacing(.5),paddingInline:t.spacing(.3),paddingBlock:t.spacing(.3),height:"100%",minWidth:"100%",backgroundColor:o?"#eaf3fb":"#eeeeee",borderRadius:"56px",width:"fit-content",fontSize:"10px",color:t.palette.text.primary,position:"relative",zIndex:10})),ft=styled$1("div")(({theme:t,percentage:o,isCapture:e})=>({border:`0.6px ${[0,100].includes(o)?"solid":"dashed"} ${e?t.palette.info.dark:"#656565"}`,borderRadius:"80px",padding:t.spacing(.316),paddingLeft:t.spacing(.516),fontSize:"7px",fontWeight:t.typography.fontWeightBold,color:e?t.palette.info.dark:"#656565",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5)})),xt=styled$1("div")(({percentage:t,isCapture:o,theme:e})=>({background:`conic-gradient(${o?e.palette.info.dark:"#656565"} ${t}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${o?e.palette.info.dark:"#656565"}`})),gt=styled$1("img")({width:"14px",height:"14px"}),j=styled$1(o)({width:"16px",height:"16px"}),N=styled$1("img")({width:"16px",height:"16px"}),Bo=styled$1(Box)({display:"flex",alignItems:"center",justifyContent:"center"});function It(t){return t<5?5:t===100?95:t}function Be({voidPercentage:t,capturePercentage:o,captureCount:e,autoType:r,captureAmount:l,voidAmount:p,currency:a$1,isTextShown:n,remainingAmount:d,isSheetViewShown:s,selectionProps:f={}}){let c=Number(o)+Number(t)===100||d<=0,g=yc(useId(),"capture-auto-icon"),T=useTheme$1(),{t:A}=useTranslation(),P=Ha(d||0),L=useCallback(C=>`Auto ${C} - ${a$1} ${P.integerAmount}.${P.decimalAmount}`,[a$1,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l:p,{integerAmount:D,decimalAmount:v}=Ia(X,a$1);return `Partial ${C} - ${a$1} ${D}.${v}`},[l,p,a$1]),x=o>0?jsx(a,{title:J("Capture"),children:jsxs(ut,{isCapture:true,isFullyUsed:c,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:T.shadows[4]}},children:[jsx(gt,{src:ub,alt:"captured"}),jsxs(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px"},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:[jsxs(ft,{isCapture:true,percentage:o,children:[o,"% ",jsx(xt,{isCapture:true,percentage:It(o)})]}),e>1&&jsxs(z,{compact:true,color:"dark",children:[e,"x"]})]})]})}):r==="CAPTURED"&&!c?jsx(a,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}):jsx(a,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}),I=o===100?jsx(a,{title:A("captured"),children:jsx(Bo,{children:jsx(N,{src:fk,alt:"captured"})})}):x,W=useMemo(()=>s&&I?jsx(b,{chipIndex:4,copyText:A("captured"),selectionProps:f,children:A("captured")}):n&&I?jsx(k,{children:A("captured")}):I,[n,I,s,f]);return W&&jsx("div",{id:g,"data-testid":"CaptureAutoIcon",style:{zIndex:12},children:W})}var Do=Be;function Ve({voidPercentage:t,capturePercentage:o,voidCount:e,autoType:r,captureAmount:l$1,voidAmount:p,currency:a$1,isTextShown:n,isSheetViewShown:d,selectionProps:s={},remainingAmount:f}){let c=Number(o)+Number(t)===100||f<=0,g=yc(useId(),"void-auto-icon"),T=useTheme$1(),{t:A}=useTranslation(),P=Ha(f||0),L=useCallback(C=>`Auto ${C} - ${a$1} ${P.integerAmount}.${P.decimalAmount}`,[a$1,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l$1:p,{integerAmount:D,decimalAmount:v}=Ia(X,a$1);return `Partial ${C} - ${a$1} ${D}.${v}`},[l$1,p,a$1]),x=t>0||p?jsx(a,{title:J("Void"),children:jsxs(ut,{isFullyUsed:c,whileHover:["animate","fadeIn"],animate:"start",sx:{zIndex:14,background:T.palette.common.white,border:`0.75px solid ${T.palette.grey[600]}1A`},variants:{animate:{boxShadow:T.shadows[4]}},children:[jsx(gt,{src:wk,alt:"void"}),jsxs(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px"},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:[jsxs(ft,{percentage:t,children:[t,"% ",jsx(xt,{percentage:It(t)})]}),e>0&&jsxs(z,{compact:true,color:"neutral",children:[e,"x"]})]})]})}):r==="VOID"&&!c?jsx(a,{title:L("Void"),children:jsx(j,{children:jsx(N,{src:tt.VOID?.icon,alt:"auto"})})}):null,I=t===100?jsx(a,{title:A("void"),children:jsx(j,{children:jsx(N,{src:wk,alt:"void"})})}):x,W=useMemo(()=>d&&I?jsx(b,{chipIndex:5,copyText:A("void"),selectionProps:s,children:A("void")}):n&&I?jsx(l,{children:A("void")}):I,[n,I,d,s]);return W?jsx("div",{id:g,"data-testid":"VoidAutoIcon",style:{...!d&&{zIndex:11}},children:W}):null}var $o=Ve;var Me=Do;var Fe=({authorizedStatus:t,isTextShown:o,iconStyles:e,tableMode:r,chipIndex:l=0,selectionProps:p={}})=>{let{t:a$1}=useTranslation(),n=useTheme$1(),d=a$1(_(t));return Va(r)?jsx(b,{copyText:d,chipIndex:l,selectionProps:p,children:d}):jsx(a,{title:d,children:o?jsx(j$1,{"data-testid":"StatusCell_AuthorizedStatusLabel",sx:{color:n.palette.info.dark},children:d}):jsx(a$2,{src:f[t],alt:"authorized-icon","data-testid":"StatusCell_AuthorizedStatusIcon",sx:e})})};var _o=styled$1(motion.span)(({theme:t})=>({color:t.palette.common.white,display:"block",fontWeight:t.typography.fontWeightBold,fontSize:"9.78px",borderRadius:"4px",paddingInline:t.spacing(.45)})),Vo=styled$1(motion.span)(()=>({display:"block",width:"0",overflow:"hidden"})),Bt=styled$1("img")(()=>({width:"10px",height:"10px"})),Lt=styled$1(motion.span)(({theme:t})=>({width:"18px",height:"18px",borderRadius:"50%",backgroundColor:t.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"relative"})),Dt=styled$1(motion.div,{shouldForwardProp:t=>t!=="isVisible"})(({isVisible:t})=>({display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",width:"0",overflow:"hidden",opacity:0,...!t&&{padding:"0 !important"}})),Mo=styled$1(motion.div)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start"})),zo=styled$1(motion.span)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minHeight:"24px",cursor:"pointer",borderRadius:"16px"})),No={delay:.2,ease:"easeIn",fadeIn:{duration:.2}},Go={animate:{width:"auto",paddingRight:"4px",paddingLeft:"4px"},fadeIn:{opacity:1,transition:{delay:.7}}},Fo={animate:{width:"auto"},fadeIn:{opacity:1,transition:{delay:1}}},Uo={animate:{width:"auto",paddingRight:"8px",paddingLeft:"4px"}},Et={fadeIn:{duration:.3},animate:{duration:.1}},Oo={fadeIn:{opacity:1}},jo=styled$1(j$1)(()=>({width:"88px",height:"100%"})),$t=styled$1(Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.25),height:"100%"}));function qe({chargeStatus:t,gatewayTooltip:o$1,acquirerTooltip:e,chargeTooltip:r,errorCode:l,isTextShown:p$1,gatewayCode:a$1,acquirerCode:n,unCapturedStyles:d,iconStyles:s$1,iconWrapperStyles:f,gatewayIconWrapperStyles:c,gatewayContainerStyles:g$1,gateWayIconStyles:T,showBadge:A=true,isSheetViewShown:P=false,selectionProps:L={},chipIndex:J=0}){let x=t?b$1[t]:null,I=t?g[t]:null,W=useTheme$1(),{t:C}=useTranslation(),X=yc(useId(),"charge-status-icon"),D=r&&jsx(Fragment,{children:jsx("div",{children:r})}),v=e&&jsxs(Fragment,{children:[jsx("div",{children:"Acquirer"}),jsx("div",{children:e})]}),Y=o$1&&jsxs(Fragment,{children:[jsx("div",{children:"Gateway"}),jsx("div",{children:o$1})]}),Ft=t&&a$3[t]&&jsx("div",{"data-testid":"ChargeStatusIcon_ChargeIcon",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",borderRadius:x?"50%":"",...f},children:jsx(p,{src:a$3[t],alt:"charge-icon","data-testid":"ChargeStatusIcon_StatusIcon",style:{borderRadius:x?"50%":"",width:"16px",height:"16px",...s$1}})});return P?jsxs($t,{children:[jsxs(b,{copyText:C(_(t)),chipIndex:J,selectionProps:L,children:[C(_(t))," ",l]}),x&&jsxs(Fragment,{children:[a$1&&jsxs(b,{copyText:"Gateway",chipIndex:1,selectionProps:L,children:["Gateway ",a$1]}),n&&jsxs(b,{copyText:"Acquirer",chipIndex:2,selectionProps:L,children:["Acquirer ",n]})]})]}):p$1?jsxs($t,{children:[jsx(a,{title:D,children:jsxs(jo,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark,borderColor:`${x?.color||I?.color||W.palette.info.dark}1A`},children:[C(_(t))," ",l]})}),x&&jsxs(Fragment,{children:[a$1&&jsx(a,{title:Y,children:jsxs(j$1,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark},children:["Gateway ",a$1]})}),n&&jsx(a,{title:v,children:jsxs(j$1,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark},children:["Acquirer ",n]})})]})]}):jsx(o,{id:X,"data-testid":"ChargeStatusIcon_StatusIconWrapper",style:{...f},children:s?.includes(t||"")&&(D||v||Y)?jsxs(zo,{"data-testid":"ChargeStatusIcon_UnCapturedContainer",whileHover:["animate","fadeIn"],style:{left:"0",...A&&{paddingInline:"12px",border:"1px solid #F2F2F2",borderRadius:"12px",backgroundColor:"#fff"},...d},children:[jsx(Mo,{"data-testid":"ChargeStatusIcon_UnCapturedBadge",sx:{borderRadius:"56px"},initial:{background:"transparent"},variants:{animate:{background:x?.background}},children:jsx(a,{title:D??C(_(t)),children:jsxs(Fragment,{children:[Ft,jsx(Vo,{"data-testid":"ChargeStatusIcon_ErrorCodeWrapper",transition:{animate:{duration:.05}},variants:Uo,style:{...l&&{padding:"0 !important"}},children:jsx(_o,{"data-testid":"ChargeStatusIcon_ErrorCodeLabel",sx:{background:x?.color},transition:No,variants:Oo,initial:{opacity:0},children:l})})]})})}),jsx(Dt,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:Et,variants:Go,style:g$1,isVisible:!!Y,children:Y&&jsx(a,{title:Y,children:jsx(Lt,{"data-testid":"ChargeStatusIcon_GatewayIconWrapper",style:{background:x?.background,...c},children:jsx(Bt,{src:x?.gatewayIcon,alt:"gateway-icon","data-testid":"ChargeStatusIcon_GatewayIcon",style:T})})})}),jsx(Dt,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:Et,variants:Fo,style:g$1,isVisible:!!v,children:v&&jsx(a,{title:v,children:jsx(Lt,{"data-testid":"ChargeStatusIcon_AcquirerIconWrapper",style:{background:x?.background,...c},children:jsx(Bt,{src:x?.acquirerIcon,alt:"acquirer-icon","data-testid":"ChargeStatusIcon_AcquirerIcon",style:T})})})})]}):jsx(a,{title:D??C(_(t)),children:jsx(o,{children:Ft})})})}var Xe=()=>{let{t}=useTranslation(),o=yc(useId(),"customer-initiated-icon");return jsx(a,{title:t("merchantInitiated"),children:jsx("img",{id:o,"data-testid":"merchantInitiatedIcon",src:vb,alt:"merchant",style:{width:"16px",height:"16px"}})})};var Ye={G:"Global",R:"Regional",L:"Local"},ot=({geographyVariant:t,countryCode:o,isTextShown:e})=>{let r=t?Ye[t]:void 0,l=r||o?`${r||""} ${r&&o?"-":""} ${o?`Country - ${o}`:""}`:void 0;return e||!o?null:jsx(a,{title:l,children:jsx(a$4,{countryCode:o})})};var tr=({geographyVariant:t,isTextShown:o,deviceCountry:e,deviceType:r,tableMode:l})=>{let p=yc(useId(),"device-icon-chip");return jsxs(Qe,{id:p,"data-testid":"DeviceIconChip",sx:{display:"flex",gap:"8px",alignItems:"center",...Va(l)&&{height:"18px"}},children:[jsx(ot,{geographyVariant:t,isTextShown:o,countryCode:e}),jsx(c,{type:r,isTextShown:o,tableMode:l})]})};var rr=({isDisputeOpen:t,iconStyles:o})=>{let e=yc(useId(),"dispute-icon");return jsx(p,{id:e,"data-testid":"StatusCell_DisputeStatusIcon",sx:{width:"13.5px",height:"13.5px"},src:t?wa:va,alt:"dispute-icon",style:o})};var Xo=styled$1(Qe,{shouldForwardProp:t=>t!=="tableMode"})(({theme:t,tableMode:o})=>({display:"flex",gap:t.spacing(.5),...Va(o)&&{height:"18px"},alignItems:"center"})),Yo=styled$1("span")(({theme:t})=>({fontSize:"10px",fontWeight:500,color:t.palette.text.primary}));function Vt({countryCode:t,isTextShown:o,cardNumber:e,bankName:r,tableMode:l}){let p=yc(useId(),"issuer-icon"),a$1=e?.slice(0,4),n=e?.slice(-4);return jsxs(Xo,{id:p,"data-testid":"IssuerIcon",tableMode:l,children:[t&&jsx(ot,{countryCode:t,isTextShown:o}),jsx(a,{title:`${r?`Issuer - ${r}`:""}`,children:jsx(Yo,{children:`${a$1||""} ${n||""}`})})]})}var sr=Vt;styled(motion.div)(({theme:t,background:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5),paddingInline:t.spacing(.75),paddingBlock:t.spacing(.5),backgroundColor:o,height:"24px",width:"fit-content",borderRadius:"24px",fontSize:"10px",color:t.palette.text.primary}));var Ra=styled("img")(()=>({height:"13.125px",width:"12px"})),bt=styled("div")(()=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",width:"65px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4.5px 8px",borderRadius:"24px"})),ka=styled("div")(({theme:t})=>({color:t.palette.common.white,background:t.palette.error.main,fontSize:"0.6rem",fontWeight:600,borderRadius:"16px",padding:"2px 8px",display:"flex",alignItems:"center",justifyContent:"center"})),Ba=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px"}));var ur=({payoutStatus:t="PENDING",isTextShown:o,payoutTooltip:e$1,iconStyles:r,isSheetViewShown:l,chipIndex:p$1=0,selectionProps:a$1={}})=>{let{t:n}=useTranslation(),d=yc(useId(),"payout-icon"),s=n(_(t)),f=e$1||s;return l?jsx(b,{chipIndex:p$1,copyText:s,selectionProps:a$1,children:s}):jsx(a,{title:f,children:o?jsx(bt,{id:d,"data-testid":"StatusCell_PayoutStatusLabel",children:s}):jsx(p,{id:d,src:e[t],alt:"settled-icon","data-testid":"StatusCell_PayoutStatusIcon",style:r})})};var Qo=styled$1(motion.img)(()=>({width:"14px",height:"14px"})),Zo=styled$1(motion.span)(({theme:t})=>({color:t.palette.common.white,borderRadius:t.spacing(.5),height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600,backgroundColor:t.palette.secondary.main})),Mt=styled$1(motion.div)(({theme:t})=>({height:"16px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:`${t.palette.secondary.main}1A`,paddingInline:t.spacing(.5),borderRadius:"56px"})),qa=(t,o,e)=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:e?t*e:t*49,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:o}}),Ka=styled$1(motion.span)(({isTextShown:t,theme:o})=>({border:`1px solid ${o.palette.divider}`,borderRadius:"12px",backgroundColor:o.palette.background.paper,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",minWidth:t?"auto":"36px",...t&&{border:"none"}})),Ja=styled$1(motion.div,{shouldForwardProp:t=>t!=="order"})(({order:t=0})=>({display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:0,left:0,zIndex:t+6,width:"fit-content",height:"24px",cursor:"pointer",borderRadius:"16px","&:hover":{zIndex:200}})),Xa=styled$1(motion.div,{shouldForwardProp:t=>t!=="statusesCount"})(({statusesCount:t=1})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",minWidth:`${t*6+36}px`,height:"24px",cursor:"pointer",borderRadius:"16px",overflow:"visible"})),Ya=styled$1("div")(()=>({display:"flex",gap:"4px",justifyContent:"flex-start",alignItems:"center",position:"relative",width:"100%",overflow:"visible"}));var hr=({isTextShown:t,refundStatus:o="PENDING",refundTooltip:e="",refundCount:r,iconStyles:l,isSheetViewShown:p$1,chipIndex:a$1=0,selectionProps:n={}})=>{let{t:d$1}=useTranslation(),s=useTheme$1(),f=yc(useId(),"refund-icon"),c=(r||0)>1,g=d$1(_(o));if(p$1)return jsxs(b,{chipIndex:a$1,selectionProps:n,copyText:g,children:[g," ",c?`${r}x`:null]});let T=jsxs(Zo,{"data-testid":"StatusCell_RefundsCountBadge",initial:{width:0,opacity:0,padding:"0px"},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex",padding:"1.285px 2.569px"},fadeIn:{transition:{delay:.5},opacity:1}},children:[r,"x"]});return t?jsx(a,{title:jsx("div",{children:jsx("div",{children:e})}),children:jsx(bt,{id:f,"data-testid":"StatusCell_RefundStatusLabel",sx:{color:d[o].color,backgroundColor:d[o].backgroundColor,width:"90px"},children:jsxs(Mt,{whileInView:c?["animate","fadeIn"]:void 0,variants:{animate:{boxShadow:s.shadows[4],gap:s.spacing(.5)}},children:[g," ",c?T:null]})})}):jsx(a,{title:jsx("div",{children:jsx("div",{children:e})}),children:c?jsxs(Mt,{id:f,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:s.shadows[4],gap:s.spacing(.5)}},children:[jsx(Qo,{src:ok,alt:"multi-refunded-icon","data-testid":"StatusCell_MultiRefundIcon"}),T]}):jsx(p,{id:f,src:c$1[o],alt:"refunded-icon","data-testid":"StatusCell_RefundStatusIcon",style:l})})},te=hr;var Cr=te;var yr={american_express:"AMEX",debit:"card",credit:"card",unionpay:"UnionPay",jaywan:"JAYWAN"},B=t=>yr[t?.toLowerCase()||""]||t;styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));var oe=styled("img")(()=>({maxWidth:"24px",maxHeight:"16px"}));styled(motion.span,{shouldForwardProp:t=>t!=="sourcesCount"})(({theme:t,sourcesCount:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${o*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:t.palette.background.paper,borderRadius:"16px"}));var ee=styled("span")(({theme:t})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:t.palette.text.primary})),re=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px",textAlign:"center",width:"100%"}));styled("span")(({theme:t})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));var ne=styled("span")(({theme:t})=>({fontSize:"10px",fontWeight:500,color:t.palette.text.primary}));function At({source:t,isTextShown:o,title:e,width:r,height:l,imgSx:p}){let{t:a$1}=useTranslation(),n=h(t);return jsx(a,{title:e,children:o?jsx(re,{"data-testid":"SourceCell_BadgeTextWrapper",children:jsx(ee,{"data-testid":"SourceCell_TextLabel","data-source":t,children:a$1(_(t))})}):jsx(oe,{src:n,alt:t,width:r,height:l,onError:d=>{d.currentTarget.src=h("card");},sx:p})})}function vr({payment:t,card:o,isTextShown:e,firstIcon:r}){let l=yc(useId(),"source-icons"),{t:p}=useTranslation(),a=useCallback(()=>{let s=[],f=bc(t),c=t?.method,g=t?.scheme;return B(c)?.toLowerCase()===B(g)?.toLowerCase()?s.push(B(c),B(f)):s.push(B(c),B(f),B(g)),s},[t]),n=useMemo(()=>jsx(At,{source:r,isTextShown:e,title:p(_(r))},r),[r,e,p]),d=useMemo(()=>a()?.filter(s=>!!s&&s!==r)?.map((s,f,c)=>{let g=t?.wallet===p("sv_wallet")?p("storedValueWallet"):p("passThruWallet"),T=f===c.length-1&&o?.last_four?`${p(_(s))} - ${o?.last_four}`:p(_(s));return jsx(At,{source:s,isTextShown:e,title:f===0&&s==="Wallet"?g:T},`${s}-${f}`)}),[a,t,o,e,p,r]);return jsxs(Box,{id:l,"data-testid":"SourceIcons",display:"flex",alignItems:"center",gap:.5,children:[r&&n,d,o?.last_four&&jsxs(ne,{children:["\xB7\xB7\xB7 ",o?.last_four]})]})}var rt={PROCESSED:Qg,FAILED:""};var se=styled("span")(({theme:t})=>({fontSize:"11px",padding:"2px 0",color:t.palette.text.primary})),le=styled("img")(()=>({width:"16px",height:"16px"})),de=styled("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}));function ce({status:t,isTextShown:o,isSheetViewShown:e,chipIndex:r=0,selectionProps:l={}}){let p=useTheme(),{t:a$1}=useTranslation(),n=yc(useId(),"destination-icon"),d=a$1(_(t));return e&&rt[t]?jsx(b,{copyText:d,chipIndex:r,selectionProps:l,children:d}):o&&rt[t]?jsx(se,{id:n,"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:"#1F88D00D",color:t==="PROCESSED"?p.palette.info.dark:p.palette.common.black},children:d}):jsx(de,{id:n,"data-testid":"DestinationIcon",className:"destination-status",children:t&&rt[t]&&jsx(a,{title:a$1(_(t)),children:jsx(le,{src:rt[t],alt:"destination-icon"})})})}export{qa as a,Ka as b,Ja as c,Xa as d,Ya as e,Ce as f,Se as g,Te as h,$o as i,Me as j,Fe as k,qe as l,Xe as m,ot as n,tr as o,rr as p,sr as q,Ra as r,ka as s,Ba as t,ur as u,Cr as v,B as w,At as x,vr as y,ce as z};
|