import{jsxs as i,jsx as e,Fragment as t}from"react/jsx-runtime";import s from"classnames";import{backwardCompatibilityForProperties as n}from"../../../helpers/backwardCompatibilityForProperties.js";import{MenuTitleSize as a,MenuTitleCaptionPosition as l}from"./MenuTitleConstants.js";import"./MenuTitle.scss.js";import o from"../../Avatar/Avatar.js";var c=function l(c){var r=c.children,m=c.caption,d=void 0===m?"":m,p=c.captionPosition,u=void 0===p?l.positions.BOTTOM:p,_=c.id,b=c.size,g=void 0===b?a.LARGE:b,v=c.titleEditable,f=void 0!==v&&v,j=c.collapsed,h=void 0!==j&&j,y=c.imageSrc,z=c.onImageClick,M=n([c.className,c.classname]),O="sm"===g?"menu-title-size__sm":"md"===g?"menu-title-size__md":"lg"===g?"menu-title-size__lg":"bg"===g?"menu-title-size__bg":"";return i("div",Object.assign({className:s("l3-style-menu-title",M)},{children:[e("div",Object.assign({className:"polygon-main-container"},{children:e(o,{size:o.sizes.MEDIUM,src:y,type:o.types.IMG,onClick:z,rectangle:!0})})),r||function(){if(d){if(!f)return e(t,{children:!h&&e("label",Object.assign({className:"l3-style-menu-title__caption l3-style-menu-title__caption--".concat(u," ").concat(O),id:_,contentEditable:!0},{children:d}))});if(f)return e(t,{children:!h&&e("label",Object.assign({className:"l3-style-menu-title__caption l3-style-menu-title__caption--".concat(u," ").concat(O),id:_},{children:d}))})}}()]}))};Object.assign(c,{positions:l,captionPositions:l,isMenuChild:!0});var r=c;export{r as default};
