"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../tslib.es6-C4EgNkz1.js"),o=require("react"),C=require("classnames"),E=require("../utils-C9NL3q0j.js"),b=require("../file-preview-card-Dikvua1q.js"),m=15,f=i=>{var{a11ySeeMoreText:M,onDelete:c,onCancel:l,onAction:a,onMenuAction:u,className:S,children:p}=i,g=A.__rest(i,["a11ySeeMoreText","onDelete","onCancel","onAction","onMenuAction","className","children"]);const[t,h]=o.useState(m),v=()=>{h(r=>r+m)},n=E.filterByType(p,b.EbayFilePreviewCard),d=n.length-t,w=n.slice(0,Math.min(t,n.length));return o.createElement("div",Object.assign({className:C("file-preview-card-group",S)},g),o.createElement("ul",null,w.map((r,s)=>o.cloneElement(r,{as:r.props.as||"li",onDelete:e=>c&&c(e,{index:s}),onCancel:e=>l&&l(e,{index:s}),onAction:e=>a&&a(e,{index:s}),onMenuAction:(e,y)=>u&&u(e,{index:s,menuActionEvent:y})})),d>0&&o.cloneElement(n[t],{seeMore:d,a11ySeeMoreText:M,onSeeMore:v,as:n[t].props.as||"li"})))};exports.EbayFilePreviewCardGroup=f;
