'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');
require('../../../utils/index.js');
require('../../../hooks/index.js');
var breadcrumbCard = require('./breadcrumb-card.js');
var index = require('../../../hooks/use-scroll/index.js');
var createNamespace = require('../../../utils/create-namespace.js');

"use strict";
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
  ...{
    name: "LlBreadcrumbCard"
  },
  __name: "breadcrumb-card",
  props: breadcrumbCard.breadcrumbCardProps,
  emits: breadcrumbCard.breadcrumbCardEmits,
  setup(__props, { expose: __expose, emit: __emit }) {
    const props = __props;
    const emits = __emit;
    const { scrollPosition, isHasScrollBar, scrollRef } = index.useScroll();
    const breadcrumbCardRef = vue.ref();
    const rootStyle = vue.computed(() => {
      return { zIndex: props.zIndex };
    });
    const isShowContentBottomBox = vue.computed(() => {
      if (props.footerShadowPlacement === "inner") {
        return props.isShowFooterShadow && isHasScrollBar.value && scrollPosition.value !== "bottom";
      } else {
        return props.isShowFooterShadow;
      }
    });
    const bem = createNamespace.createNamespace("breadcrumb-card");
    const handleClose = async () => {
      emits("update:visible", false);
      emits("close", props.visible);
    };
    const scrollTop = () => {
      if (scrollRef && scrollRef.value) {
        scrollRef.value.scrollTop = 0;
        scrollPosition.value = "top";
      }
    };
    __expose({
      scrollTop
    });
    return (_ctx, _cache) => {
      const _component_ll_icon = vue.resolveComponent("ll-icon");
      const _component_a_breadcrumb_item = vue.resolveComponent("a-breadcrumb-item");
      const _component_a_breadcrumb = vue.resolveComponent("a-breadcrumb");
      return _ctx.visible ? (vue.openBlock(), vue.createElementBlock(
        "div",
        {
          key: 0,
          ref_key: "breadcrumbCardRef",
          ref: breadcrumbCardRef,
          class: vue.normalizeClass(`${vue.unref(bem).b()} ${_ctx.rootClass}`),
          style: vue.normalizeStyle(rootStyle.value)
        },
        [
          vue.createElementVNode(
            "div",
            {
              class: vue.normalizeClass(vue.unref(bem).e("container"))
            },
            [
              vue.createCommentVNode(" \u5934\u90E8\u5BFC\u822A\u680F "),
              vue.createElementVNode(
                "div",
                {
                  class: vue.normalizeClass(vue.unref(bem).e("header"))
                },
                [
                  vue.createCommentVNode(" \u5DE6\u8FB9\u8FD4\u56DE "),
                  vue.createVNode(_component_a_breadcrumb, {
                    class: vue.normalizeClass(vue.unref(bem).e("back"))
                  }, {
                    default: vue.withCtx(() => [
                      vue.createVNode(_component_a_breadcrumb_item, {
                        class: "icon",
                        onClick: handleClose
                      }, {
                        default: vue.withCtx(() => [
                          vue.createVNode(_component_ll_icon, {
                            "icon-name": "icon-return-arrow",
                            class: vue.normalizeClass(["back-icon", vue.unref(bem).e("back-icon")])
                          }, null, 8, ["class"])
                        ]),
                        _: 1
                        /* STABLE */
                      }),
                      vue.createVNode(_component_a_breadcrumb_item, {
                        class: vue.normalizeClass(vue.unref(bem).e("title"))
                      }, {
                        default: vue.withCtx(() => [
                          vue.createTextVNode(
                            vue.toDisplayString(_ctx.title),
                            1
                            /* TEXT */
                          )
                        ]),
                        _: 1
                        /* STABLE */
                      }, 8, ["class"])
                    ]),
                    _: 1
                    /* STABLE */
                  }, 8, ["class"]),
                  vue.createCommentVNode(" \u5934\u90E8\u53F3\u8FB9\u63D2\u69FD "),
                  vue.renderSlot(_ctx.$slots, "extra")
                ],
                2
                /* CLASS */
              ),
              vue.createCommentVNode(" \u5185\u5BB9\u533A\u57DF "),
              vue.createElementVNode(
                "div",
                vue.mergeProps({
                  class: `${vue.unref(bem).e("content")}`
                }, _ctx.$attrs),
                [
                  vue.createCommentVNode(" \u5185\u5BB9\u6EDA\u52A8\u533A\u57DF "),
                  vue.createElementVNode(
                    "div",
                    {
                      ref_key: "scrollRef",
                      ref: scrollRef,
                      class: vue.normalizeClass(`${vue.unref(bem).e("content-container")}`)
                    },
                    [
                      vue.renderSlot(_ctx.$slots, "default")
                    ],
                    2
                    /* CLASS */
                  )
                ],
                16
                /* FULL_PROPS */
              ),
              vue.createCommentVNode(" \u5E95\u90E8footer "),
              _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock(
                "div",
                {
                  key: 0,
                  class: vue.normalizeClass(`${vue.unref(bem).e("footer")} ${isShowContentBottomBox.value ? vue.unref(bem).e("footer-shadow") : ""}`)
                },
                [
                  vue.renderSlot(_ctx.$slots, "footer")
                ],
                2
                /* CLASS */
              )) : vue.createCommentVNode("v-if", true)
            ],
            2
            /* CLASS */
          )
        ],
        6
        /* CLASS, STYLE */
      )) : vue.createCommentVNode("v-if", true);
    };
  }
});

exports.default = _sfc_main;
//# sourceMappingURL=breadcrumb-card.vue2.js.map
