import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{useState}from"react";import{Tag,ToggleButton}from"../common";const MAX_PATTERN_LENGTH=45;export function Pattern({pattern:t}){const[e,n]=useState(!1);if(!t)return null;return _jsxs(_Fragment,{children:[_jsx(Tag,{children:e||t.length<MAX_PATTERN_LENGTH?t:`${t.slice(0,MAX_PATTERN_LENGTH)}...`}),t.length>MAX_PATTERN_LENGTH&&_jsx(ToggleButton,{onClick:()=>{n(!e)},children:e?"Hide pattern":"Show pattern"})]})}
//# sourceMappingURL=Pattern.js.map