import './title.less'; import {WidgetType, IconButton, LeftRightVerticalAdapt} from '@ui/index'; import TitleItem from './item/title_item'; import {isDesigner, closeWindow} from '@shared/crud/crud.request'; import {TAB_LINK_SET, TAB_LINK_POOL} from '@private/constants'; const className = 'dec.dcm.title'; const Widget: WidgetType = { props: { baseCls: 'dec-webui-dcm-title bi-card bi-border-bottom', }, render() { const showCloseButton = isDesigner(); return { type: LeftRightVerticalAdapt, items: { left: [ { type: TitleItem, cls: 'title-item-selected bi-border-bottom', text: BI.i18nText('Dec-Dcm_Connection_Management'), value: TAB_LINK_SET, }, { type: TitleItem, text: BI.i18nText('Dec-Dcm_Pool_Connection_Management'), value: TAB_LINK_POOL, }, ], right: [ showCloseButton ? { type: IconButton, cls: 'close-ha-font', width: 30, height: 30, rgap: 10, handler() { closeWindow(); }, } : null, ], }, }; }, }; BI.shortcut(className, BI.inherit(BI.Widget, Widget)); export default className;