"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("../containers/button.js");require("../containers/card.js");var v=require("../../lib/cn.js"),b=require("../icons/ico-checkmark.js"),j=require("../icons/ico-copy.js"),p=require("../icons/ico-eye-closed.js"),m=require("../icons/ico-eye-opened.js");require("../primitives/button.js"),require("../primitives/checkbox.js"),require("../primitives/dropdown-selector.js"),require("../primitives/popover.js"),require("../primitives/radio.js"),require("../primitives/segmented-control.js"),require("../primitives/switch.js");var c=require("../primitives/text.js"),r=require("react");require("../utils/client-asset-logo.js"),require("react-qrcode-logo"),require("../utils/secured-by-magic.js"),require("../containers/header.js"),require("../containers/menu.js"),require("../containers/modal.js"),require("../containers/overlay.js");const d=h=>{const{content:t,onCopy:a,showHideButton:i,mono:x}=h,[o,u]=r.useState(!!i),[s,l]=r.useState(!1);r.useEffect(()=>{if(s){const f=setTimeout(()=>{l(!1)},1500);return()=>clearTimeout(f)}},[s]),r.useEffect(()=>{u(!!i)},[i]);const q=r.useCallback(()=>{a&&(a(t),l(!0))},[t]);return e.jsxs("div",{className:"flex flex-row items-center w-full px-4 py-3 rounded-[10px] bg-surface-secondary justify-between relative",children:[e.jsx("div",{className:v.cn("text-nowrap overflow-hidden",o?"select-none blur-[10px]":"select-auto"),children:x?e.jsx(c.default.Mono,{truncate:!0,children:t}):e.jsx(c.default,{truncate:!0,children:t})}),e.jsxs("div",{className:"flex flex-row items-center gap-3",children:[o&&e.jsx(n.ButtonContainer,{onPress:()=>u(!1),"aria-label":"show",children:e.jsx(p.default,{width:22,height:22,color:"var(--color-brand-base)"})}),i&&!o&&e.jsx(n.ButtonContainer,{onPress:()=>u(!0),"aria-label":"hide",children:e.jsx(m.default,{width:22,height:22,color:"var(--color-brand-base)"})}),a&&e.jsx(e.Fragment,{children:s?e.jsx(b.default,{width:22,height:22,color:"var(--color-brand-base)"}):e.jsx(n.ButtonContainer,{onPress:q,"aria-label":"copy",children:e.jsx(j.default,{width:22,height:22,color:"var(--color-brand-base)"})})})]})]})};d.displayName="TextBox",exports.default=d;
//# sourceMappingURL=text-box.js.map
