import { SwitchNum } from "../../comFn/comType";
export var ConnectorStyle = /*#__PURE__*/function () {
  function ConnectorStyle() {
    this.style = void 0;
    this.switchList = void 0;
  }
  var _proto = ConnectorStyle.prototype;
  _proto.loadStyle = function loadStyle(style, switchList) {
    this.style = style;
    this.switchList = switchList;
  };
  _proto.getTitleStyle = function getTitleStyle() {
    return {
      color: this.style.webTitleColor,
      fontSize: this.style.webTitleSize + "px"
    };
  };
  _proto.getNavigatorBg = function getNavigatorBg() {
    var displayFlag = false;
    if (this.switchList && this.switchList.length > 0 && this.switchList[0] !== undefined) {
      displayFlag = this.switchList[0] === SwitchNum.cssHidden;
    }
    var display = displayFlag ? 'none' : '';
    var result = {
      background: this.style.backgroundColor,
      height: this.style.height,
      display: display
    };
    return result;
  };
  _proto.getFlexedLayout = function getFlexedLayout() {
    var result = {
      height: this.style.height,
      background: this.style.backgroundColor
    };
    if (this.style.fixedLayout && this.style.fixedLayout === 'top') {
      result['position'] = 'fixed';
      result['top'] = 0;
    }
    return result;
  };
  return ConnectorStyle;
}();