import{jsx as r,Fragment as i,jsxs as l}from"react/jsx-runtime";import{useState as c}from"react";import{Tag as h,ToggleButton as m}from"../common/index.js";import{useTranslate as g}from"../../hooks/index.js";const n=45;function T({pattern:t}){const o=g(),[e,s]=c(!1);if(!t)return null;const a=()=>{s(!e)};return l(i,{children:[r(h,{children:e||t.length<n?t:`${t.slice(0,n)}...`}),t.length>n&&r(m,{onClick:a,children:e?o("openapi.hidePattern","Hide pattern"):o("openapi.showPattern","Show pattern")})]})}export{T as Pattern};
