"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Pattern=void 0;const jsx_runtime_1=require("react/jsx-runtime"),react_1=require("react"),common_1=require("../common"),MAX_PATTERN_LENGTH=45;function Pattern({pattern:e}){const[t,r]=(0,react_1.useState)(!1);if(!e)return null;return(0,jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment,{children:[(0,jsx_runtime_1.jsx)(common_1.Tag,{children:t||e.length<MAX_PATTERN_LENGTH?e:`${e.slice(0,MAX_PATTERN_LENGTH)}...`}),e.length>MAX_PATTERN_LENGTH&&(0,jsx_runtime_1.jsx)(common_1.ToggleButton,{onClick:()=>{r(!t)},children:t?"Hide pattern":"Show pattern"})]})}exports.Pattern=Pattern;
//# sourceMappingURL=Pattern.js.map