"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const index = require("../../../hooks/use-locale/index.js");
const index$1 = require("../../../hooks/use-namespace/index.js");
const index$2 = require("../../icon/index.js");
const index$3 = require("../../divider/index.js");
const pageHeader = require("./page-header.js");
const vue = require("vue");
const _hoisted_1 = ["aria-label"];
var page_header_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
  name: "ElPageHeader",
  __name: "page-header",
  props: pageHeader.pageHeaderProps,
  emits: pageHeader.pageHeaderEmits,
  setup(__props, { emit: __emit }) {
    const emit = __emit;
    const { t } = index.useLocale();
    const ns = index$1.useNamespace("page-header");
    function handleClick() {
      emit("back");
    }
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createElementBlock("div", { class: vue.normalizeClass([
        vue.unref(ns).b(),
        vue.unref(ns).is("contentful", !!_ctx.$slots.default),
        {
          [vue.unref(ns).m("has-breadcrumb")]: !!_ctx.$slots.breadcrumb,
          [vue.unref(ns).m("has-extra")]: !!_ctx.$slots.extra
        }
      ]) }, [
        _ctx.$slots.breadcrumb ? (vue.openBlock(), vue.createElementBlock("div", {
          key: 0,
          class: vue.normalizeClass(vue.unref(ns).e("breadcrumb"))
        }, [vue.renderSlot(_ctx.$slots, "breadcrumb")], 2)) : vue.createCommentVNode("v-if", true),
        vue.createElementVNode("div", { class: vue.normalizeClass(vue.unref(ns).e("header")) }, [vue.createElementVNode("div", { class: vue.normalizeClass(vue.unref(ns).e("left")) }, [
          vue.createElementVNode("div", {
            class: vue.normalizeClass(vue.unref(ns).e("back")),
            role: "button",
            tabindex: "0",
            onClick: handleClick
          }, [__props.icon || _ctx.$slots.icon ? (vue.openBlock(), vue.createElementBlock("div", {
            key: 0,
            "aria-label": __props.title || vue.unref(t)("el.pageHeader.title"),
            class: vue.normalizeClass(vue.unref(ns).e("icon"))
          }, [vue.renderSlot(_ctx.$slots, "icon", {}, () => [__props.icon ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.ElIcon), { key: 0 }, {
            default: vue.withCtx(() => [(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.icon)))]),
            _: 1
          })) : vue.createCommentVNode("v-if", true)])], 10, _hoisted_1)) : vue.createCommentVNode("v-if", true), vue.createElementVNode("div", { class: vue.normalizeClass(vue.unref(ns).e("title")) }, [vue.renderSlot(_ctx.$slots, "title", {}, () => [vue.createTextVNode(vue.toDisplayString(__props.title || vue.unref(t)("el.pageHeader.title")), 1)])], 2)], 2),
          vue.createVNode(vue.unref(index$3.ElDivider), { direction: "vertical" }),
          vue.createElementVNode("div", { class: vue.normalizeClass(vue.unref(ns).e("content")) }, [vue.renderSlot(_ctx.$slots, "content", {}, () => [vue.createTextVNode(vue.toDisplayString(__props.content), 1)])], 2)
        ], 2), _ctx.$slots.extra ? (vue.openBlock(), vue.createElementBlock("div", {
          key: 0,
          class: vue.normalizeClass(vue.unref(ns).e("extra"))
        }, [vue.renderSlot(_ctx.$slots, "extra")], 2)) : vue.createCommentVNode("v-if", true)], 2),
        _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("div", {
          key: 1,
          class: vue.normalizeClass(vue.unref(ns).e("main"))
        }, [vue.renderSlot(_ctx.$slots, "default")], 2)) : vue.createCommentVNode("v-if", true)
      ], 2);
    };
  }
});
exports.default = page_header_vue_vue_type_script_setup_true_lang_default;
