"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;
