"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CallbackSummary=void 0;const jsx_runtime_1=require("react/jsx-runtime"),theme_1=require("@redocly/theme"),styled_components_1=__importDefault(require("styled-components")),Panel_1=require("../Panel"),common_1=require("../common"),services_1=require("../../services"),utils_1=require("../../utils"),styled_1=require("./styled"),PlusCircleIcon_1=require("../PropertyDetails/PlusCircleIcon"),LinkToField_1=require("../common/LinkToField");function CallbackSummary({expanded:e=!1,toggle:r,callback:{name:i,httpVerb:n,deprecated:t,callbackId:l,id:a}}){return(0,jsx_runtime_1.jsxs)(CallbackHeader,{expanded:e,onClick:r,children:[(0,jsx_runtime_1.jsx)(LinkToField_1.LinkToField,{to:(0,services_1.makeDeepLink)(a,`callbacks/${l}`)}),(0,jsx_runtime_1.jsxs)(Panel_1.Trigger,{children:[(0,jsx_runtime_1.jsx)(CircleIconWrap,{children:(0,jsx_runtime_1.jsx)(PlusCircleIcon_1.CircleIcon,{sign:e?"-":"+"})}),(0,jsx_runtime_1.jsx)(styled_1.CallbackTitle,{deprecated:t,children:i}),(0,jsx_runtime_1.jsx)(common_1.HttpVerb,{color:n,children:(0,utils_1.shortenHTTPVerb)(n)}),t?(0,jsx_runtime_1.jsx)(theme_1.Badge,{deprecated:!0,children:"Deprecated"}):null]})]})}exports.CallbackSummary=CallbackSummary;const CallbackHeader=(0,styled_components_1.default)(theme_1.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_components_1.default.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