'use strict';

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

var vue = require('vue');
var elementPlus = require('element-plus');
var index = require('../../svg-icon/index.js');

"use strict";
const _hoisted_1 = { style: { "cursor": "pointer", "margin-bottom": "2px", "display": "flex" } };
const _hoisted_2 = { key: 2 };
const __default__ = vue.defineComponent({
  name: "me-breadcrumb"
});
var script = /* @__PURE__ */ vue.defineComponent({
  ...__default__,
  props: {
    "modelValue": { type: Array },
    "modelModifiers": {}
  },
  emits: ["update:modelValue"],
  setup(__props) {
    const props = __props;
    const data = vue.useModel(__props, "modelValue");
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createBlock(
        vue.unref(elementPlus.ElBreadcrumb),
        vue.mergeProps(_ctx.$attrs, { style: { "margin-bottom": "0px", "display": "flex", "align-items": "center" } }),
        {
          default: vue.withCtx(() => [
            (vue.openBlock(true), vue.createElementBlock(
              vue.Fragment,
              null,
              vue.renderList(data.value, (item) => {
                return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElBreadcrumbItem), {
                  key: item.label,
                  to: item.to
                }, {
                  default: vue.withCtx(() => [
                    item.type == "select" ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElSelect), {
                      key: 0,
                      modelValue: item.value,
                      "onUpdate:modelValue": ($event) => item.value = $event,
                      style: { "width": "240px", "margin-bottom": "0px" },
                      onChange: item.change,
                      options: item.options,
                      props: item.props
                    }, null, 8, ["modelValue", "onUpdate:modelValue", "onChange", "options", "props"])) : item.type == "menu" ? (vue.openBlock(), vue.createBlock(
                      vue.unref(elementPlus.ElDropdown),
                      {
                        key: 1,
                        trigger: "click"
                      },
                      {
                        dropdown: vue.withCtx(() => [
                          vue.createVNode(
                            vue.unref(elementPlus.ElDropdownMenu),
                            null,
                            {
                              default: vue.withCtx(() => [
                                (vue.openBlock(true), vue.createElementBlock(
                                  vue.Fragment,
                                  null,
                                  vue.renderList(item.options, (menuItem) => {
                                    return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDropdownItem), {
                                      onClick: menuItem.click
                                    }, {
                                      default: vue.withCtx(() => [
                                        vue.createTextVNode(
                                          vue.toDisplayString(menuItem.label),
                                          1
                                          /* TEXT */
                                        )
                                      ]),
                                      _: 2
                                      /* DYNAMIC */
                                    }, 1032, ["onClick"]);
                                  }),
                                  256
                                  /* UNKEYED_FRAGMENT */
                                ))
                              ]),
                              _: 2
                              /* DYNAMIC */
                            },
                            1024
                            /* DYNAMIC_SLOTS */
                          )
                        ]),
                        default: vue.withCtx(() => [
                          vue.createElementVNode("div", _hoisted_1, [
                            vue.createTextVNode(
                              vue.toDisplayString(item.name) + " ",
                              1
                              /* TEXT */
                            ),
                            vue.createVNode(vue.unref(index.MeSvgIcon), { name: "ri-arrow-down-s-fill" })
                          ])
                        ]),
                        _: 2
                        /* DYNAMIC */
                      },
                      1024
                      /* DYNAMIC_SLOTS */
                    )) : (vue.openBlock(), vue.createElementBlock(
                      "span",
                      _hoisted_2,
                      vue.toDisplayString(item.label),
                      1
                      /* TEXT */
                    ))
                  ]),
                  _: 2
                  /* DYNAMIC */
                }, 1032, ["to"]);
              }),
              128
              /* KEYED_FRAGMENT */
            ))
          ]),
          _: 1
          /* STABLE */
        },
        16
        /* FULL_PROPS */
      );
    };
  }
});

exports.default = script;
//# sourceMappingURL=breadcrumb.vue2.js.map
