"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../tslib.es6-C4EgNkz1.js"),t=require("react"),i=e=>typeof e=="string"?[...e].length:typeof e=="number"?e:0,g=e=>{var{children:u,max:n,clippedText:a,value:r,onChange:o}=e,s=f.__rest(e,["children","max","clippedText","value","onChange"]);const[l,m]=t.useState(i(r));return t.useEffect(()=>{const p=setTimeout(()=>{const c=i(r);m(c),o&&o({count:c,inputAriaLive:c>=n?"polite":"off"})},500);return()=>clearTimeout(p)},[r,n,o]),t.createElement("span",Object.assign({},s),u||t.createElement(t.Fragment,null,l,"/",n,a&&t.createElement("span",{className:"clipped"},a)))};exports.EbayCharacterCount=g;
