import "../styles/reset.css";
import "./navigation.less";
import { withInstall as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_withInstall__ } from "../shared";
import { createVNode as __WEBPACK_EXTERNAL_MODULE_vue_createVNode__, defineComponent as __WEBPACK_EXTERNAL_MODULE_vue_defineComponent__, onBeforeUnmount as __WEBPACK_EXTERNAL_MODULE_vue_onBeforeUnmount__, reactive as __WEBPACK_EXTERNAL_MODULE_vue_reactive__, ref as __WEBPACK_EXTERNAL_MODULE_vue_ref__ } from "vue";
import { usePrefix as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__ } from "../config-provider";
import { CollapseLeft as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_CollapseLeft__ } from "../icon";

;// external "../shared"

;// external "vue"

;// external "../config-provider"

;// external "../icon"

;// ../../packages/navigation/src/navigation-title.tsx
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */


var TitleProps = {
  sideTitle: {
    type: String,
    "default": ''
  },
  navigationType: {
    type: String,
    "default": 'left-right'
  }
};
/* harmony default export */ const navigation_title = (__WEBPACK_EXTERNAL_MODULE_vue_defineComponent__({
  props: TitleProps,
  // slots: ['side-icon'],
  slots: Object,
  setup: function setup(props, _ref) {
    var slots = _ref.slots;
    var _usePrefix = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__(),
      resolveClassName = _usePrefix.resolveClassName;
    return function () {
      var _slots$default, _slots$sideIcon;
      return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
        "style": {
          borderBottomWidth: props.navigationType === 'left-right' ? '0' : '1px'
        },
        "class": "".concat(resolveClassName('navigation-title'))
      }, [((_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots)) || [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("span", {
        "class": "title-icon"
      }, [((_slots$sideIcon = slots['side-icon']) === null || _slots$sideIcon === void 0 ? void 0 : _slots$sideIcon.call(slots)) || __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("i", {
        "class": "".concat(resolveClassName('icon'), " icon-rtx")
      }, null)]), __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("span", {
        "class": "title-desc"
      }, [props.sideTitle])]]);
    };
  }
}));
;// ../../packages/navigation/src/navigation.tsx
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */




var NavigationProps = {
  navWidth: {
    type: [Number, String],
    "default": 60
  },
  hoverWidth: {
    type: [Number, String],
    "default": 260
  },
  showSideNavTitle: {
    type: Boolean,
    "default": true
  },
  sideTitle: {
    type: String,
    "default": ''
  },
  headerTitle: {
    type: String,
    "default": ''
  },
  hoverLeaveDelay: {
    type: Number,
    "default": 0
  },
  hoverEnterDelay: {
    type: Number,
    "default": 100
  },
  defaultOpen: Boolean,
  headHeight: {
    type: [Number, String],
    "default": 52
  },
  navigationType: {
    type: String,
    "default": 'left-right',
    validator: function validator(v) {
      return ['top-bottom', 'left-right'].includes(v);
    }
  },
  needMenu: {
    type: Boolean,
    "default": true
  }
};
/* harmony default export */ const navigation = (__WEBPACK_EXTERNAL_MODULE_vue_defineComponent__({
  name: 'Navigation',
  props: NavigationProps,
  emits: ['leave', 'toggle', 'hover', 'toggle-click'],
  // slots: ['header', 'menu', 'footer', 'side-icon', 'side-header'],
  slots: Object,
  setup: function setup(props, _ref) {
    var emit = _ref.emit;
    var defaultHeaderTitle = __WEBPACK_EXTERNAL_MODULE_vue_ref__(props.headerTitle);
    var nav = __WEBPACK_EXTERNAL_MODULE_vue_reactive__({
      click: false,
      hover: false,
      delay: false,
      timer: null,
      enterTimer: null
    });
    if (props.defaultOpen) {
      nav.click = !nav.click;
      nav.hover = nav.click;
      emit('toggle', nav.hover);
    }
    __WEBPACK_EXTERNAL_MODULE_vue_onBeforeUnmount__(function () {
      nav.timer && window.clearTimeout(nav.timer);
    });
    var handleMouseOver = function handleMouseOver() {
      if (!nav.click) {
        nav.enterTimer = setTimeout(function () {
          nav.hover = true;
          nav.enterTimer && window.clearTimeout(nav.enterTimer);
          nav.timer && window.clearTimeout(nav.timer);
          emit('hover', nav.hover);
          emit('toggle', nav.hover);
        }, props.hoverEnterDelay);
      }
    };
    var handleMouseLeave = function handleMouseLeave() {
      if (!nav.click) {
        nav.enterTimer && window.clearTimeout(nav.enterTimer);
        nav.timer = setTimeout(function () {
          nav.hover = false;
          window.clearTimeout(nav.timer);
          emit('leave', nav.hover);
          emit('toggle', nav.hover);
        }, props.hoverLeaveDelay);
      }
    };
    var handleClick = function handleClick() {
      nav.click = !nav.click;
      nav.hover = nav.click;
      emit('toggle', nav.hover);
      emit('toggle-click', nav.hover);
    };
    var _usePrefix = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__(),
      resolveClassName = _usePrefix.resolveClassName;
    return {
      defaultHeaderTitle: defaultHeaderTitle,
      nav: nav,
      onBeforeUnmount: __WEBPACK_EXTERNAL_MODULE_vue_onBeforeUnmount__,
      handleMouseOver: handleMouseOver,
      handleMouseLeave: handleMouseLeave,
      handleClick: handleClick,
      resolveClassName: resolveClassName
    };
  },
  render: function render() {
    var _this$$slots$header, _this$$slots, _this$$slots$menu, _this$$slots2, _this$$slots$sideFoo, _this$$slots3, _this$$slots$header2, _this$$slots4, _this$$slots$headerS, _this$$slots5, _this$$slots$default, _this$$slots6, _this$$slots$footer, _this$$slots7;
    return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
      "class": "".concat(this.resolveClassName('navigation'))
    }, [this.navigationType === 'top-bottom' && __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
      "style": {
        flexBasis: "".concat(this.headHeight, "px")
      },
      "class": "".concat(this.resolveClassName('navigation-header'))
    }, [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__(navigation_title, {
      "sideTitle": this.sideTitle
    }, {
      "default": this.$slots['side-header'],
      'side-icon': !this.$slots['side-header'] ? this.$slots['side-icon'] : undefined
    }), __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
      "class": "header-right"
    }, [(_this$$slots$header = (_this$$slots = this.$slots).header) === null || _this$$slots$header === void 0 ? void 0 : _this$$slots$header.call(_this$$slots)])]), __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
      "class": "".concat(this.resolveClassName('navigation-wrapper'))
    }, [this.needMenu && __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
      "style": {
        width: !this.nav.click ? "".concat(this.navWidth, "px") : "".concat(this.hoverWidth, "px")
      },
      "class": "navigation-nav"
    }, [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
      "style": {
        width: !this.nav.hover ? "".concat(this.navWidth, "px") : "".concat(this.hoverWidth, "px"),
        borderRight: this.navigationType !== 'top-bottom' ? 'none' : '1px solid #DCDEE5'
      },
      "class": "nav-slider",
      "onMouseenter": this.handleMouseOver,
      "onMouseleave": this.handleMouseLeave
    }, [this.navigationType !== 'top-bottom' && this.showSideNavTitle && __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(navigation_title, {
      "style": {
        flexBasis: "".concat(this.headHeight, "px")
      },
      "sideTitle": this.sideTitle
    }, {
      "default": this.$slots['side-header'],
      'side-icon': !this.$slots['side-header'] ? this.$slots['side-icon'] : undefined
    }), __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
      "style": {
        height: "calc(100vh - ".concat(+this.headHeight + 56, "px)")
      },
      "class": "nav-slider-list"
    }, [(_this$$slots$menu = (_this$$slots2 = this.$slots).menu) === null || _this$$slots$menu === void 0 ? void 0 : _this$$slots$menu.call(_this$$slots2)]), __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
      "class": "nav-slider-footer"
    }, [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
      "class": {
        'is-left': this.navigationType !== 'top-bottom',
        'footer-icon': true
      },
      "onClick": this.handleClick
    }, [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_CollapseLeft__, {
      "style": {
        transform: this.nav.click ? 'rotate(180deg)' : 'rotate(0deg)'
      },
      "class": "footer-icon-svg"
    }, null)])]), (_this$$slots$sideFoo = (_this$$slots3 = this.$slots)['side-footer']) === null || _this$$slots$sideFoo === void 0 ? void 0 : _this$$slots$sideFoo.call(_this$$slots3)])]), __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
      "style": {
        maxWidth: this.needMenu ? 'calc(100vw - 60px)' : '100vw'
      },
      "class": "navigation-container"
    }, [this.navigationType !== 'top-bottom' && __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
      "style": {
        flexBasis: "".concat(this.headHeight, "px")
      },
      "class": "container-header"
    }, [((_this$$slots$header2 = (_this$$slots4 = this.$slots).header) === null || _this$$slots$header2 === void 0 ? void 0 : _this$$slots$header2.call(_this$$slots4)) || [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
      "class": "container-header-title"
    }, [this.headerTitle]), __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
      "class": "container-header-sets"
    }, [(_this$$slots$headerS = (_this$$slots5 = this.$slots)['header-set']) === null || _this$$slots$headerS === void 0 ? void 0 : _this$$slots$headerS.call(_this$$slots5)])]]), __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
      "style": {
        maxHeight: "calc(100vh - ".concat(this.headHeight, "px)")
      },
      "class": "container-content"
    }, [(_this$$slots$default = (_this$$slots6 = this.$slots)["default"]) === null || _this$$slots$default === void 0 ? void 0 : _this$$slots$default.call(_this$$slots6), __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
      "class": "container-footer"
    }, [(_this$$slots$footer = (_this$$slots7 = this.$slots).footer) === null || _this$$slots$footer === void 0 ? void 0 : _this$$slots$footer.call(_this$$slots7)])])])])]);
  }
}));
;// ../../packages/navigation/src/index.ts
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */


var Navigation = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_withInstall__(navigation);
/* harmony default export */ const src = (Navigation);
export { src as default };
