import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{PanelHeader,Badge}from"@redocly/theme";import styled from"styled-components";import{Trigger}from"../Panel";import{HttpVerb}from"../common";import{makeDeepLink}from"../../services";import{shortenHTTPVerb}from"../../utils";import{CallbackTitle}from"./styled";import{CircleIcon}from"../PropertyDetails/PlusCircleIcon";import{LinkToField}from"../common/LinkToField";export function CallbackSummary({expanded:e=!1,toggle:r,callback:{name:a,httpVerb:i,deprecated:o,callbackId:n,id:l}}){return _jsxs(CallbackHeader,{expanded:e,onClick:r,children:[_jsx(LinkToField,{to:makeDeepLink(l,`callbacks/${n}`)}),_jsxs(Trigger,{children:[_jsx(CircleIconWrap,{children:_jsx(CircleIcon,{sign:e?"-":"+"})}),_jsx(CallbackTitle,{deprecated:o,children:a}),_jsx(HttpVerb,{color:i,children:shortenHTTPVerb(i)}),o?_jsx(Badge,{deprecated:!0,children:"Deprecated"}):null]})]})}const CallbackHeader=styled(PanelHeader)`
  padding: var(--spacing-sm) 0 var(--spacing-sm) calc(var(--spacing-unit) / 2);
  margin: 0;
  line-height: var(--line-height-base);
  position: relative;
`,CircleIconWrap=styled.button`
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0;
  gap: var(--spacing-xxs);
  color: var(--text-color-secondary);
  font-size: var(--font-size-base);
  font-family: var(--font-family-base);
  line-height: var(--line-height-base);
`;
//# sourceMappingURL=CallbackSummary.js.map