import { person as s } from "@universityofmaryland/web-elements-library/composite";
import { createStyledSlotOrClone as d, createSlot as c } from "@universityofmaryland/web-utilities-library/elements";
import { Slots as a, Register as m, Attributes as n } from "@universityofmaryland/web-model-library";
import * as C from "@universityofmaryland/web-utilities-library/validation";
const i = ({
  element: o,
  isThemeDark: e
}) => ({
  address: a.contact.address({ element: o }),
  slotTwo: a.person.association({ element: o }),
  name: a.person.name({ element: o }),
  email: a.contact.email({ element: o }),
  slotOne: a.person.jobTitle({ element: o }),
  slotThreeItalic: a.person.pronouns({ element: o }),
  phone: a.contact.phone({ element: o }),
  linkedin: a.social.linkedin({ element: o }),
  image: C.getValidatedSlotImage({
    element: o,
    slotName: a.name.assets.image
  }),
  additionalContact: a.contact.additional({ element: o }),
  slotFour: a.text.subText({ element: o }),
  actions: a.actions.default({ element: o }),
  isThemeDark: e
}), w = "umd-element-person-bio", E = {
  name: {},
  pronouns: {},
  "job-title": {},
  association: {},
  email: { allowedElements: ["a"] },
  phone: { allowedElements: ["a"] },
  address: {},
  linkedin: { allowedElements: ["a"] },
  "additional-contact": {},
  image: { allowedElements: ["img"] },
  description: {},
  "sub-text": {},
  actions: a.element.allowed.actions
}, D = (o) => {
  const e = n.isTheme.dark({ element: o });
  return n.isLayout.fullImage({ element: o }) ? s.bio.full({
    ...i({ element: o, isThemeDark: e }),
    description: d({
      element: o,
      slotRef: a.name.DESCRIPTION
    })
  }) : s.bio.small({
    ...i({ element: o, isThemeDark: e }),
    description: d({
      element: o,
      slotRef: a.name.DESCRIPTION
    })
  });
}, p = m.webComponent({
  tagName: w,
  slots: E,
  createComponent: D
}), h = "umd-element-person", f = {
  name: {},
  pronouns: {},
  "job-title": {},
  association: {},
  email: { allowedElements: ["a"] },
  phone: { allowedElements: ["a"] },
  address: {},
  linkedin: { allowedElements: ["a"] },
  "additional-contact": {},
  image: { allowedElements: ["img"] },
  "sub-text": {},
  actions: a.element.allowed.actions
}, R = (o) => {
  const e = n.isDisplay.list({ element: o }), l = n.isDisplay.tabular({ element: o }), t = n.isTheme.dark({ element: o });
  return e ? s.list(i({ element: o, isThemeDark: t })) : l ? s.tabular(i({ element: o, isThemeDark: t })) : s.block(i({ element: o, isThemeDark: t }));
}, u = m.webComponent({
  tagName: h,
  slots: f,
  createComponent: R
}), T = "umd-element-person-hero", k = {
  name: {},
  pronouns: {},
  "job-title": {},
  association: {},
  email: { allowedElements: ["a"] },
  phone: { allowedElements: ["a"] },
  address: {},
  linkedin: { allowedElements: ["a"] },
  "additional-contact": {},
  image: { allowedElements: ["img"] },
  "sub-text": {},
  actions: a.element.allowed.actions,
  breadcrumb: { allowedElements: ["umd-element-breadcrumb"] }
}, y = (o) => {
  const e = n.isTheme.dark({
    element: o
  }), l = c(a.name.BREADCRUMB), t = i({ element: o, isThemeDark: e });
  if (l) {
    const r = o.querySelector(
      `[slot="${a.name.BREADCRUMB}"]`
    );
    if (r) {
      const g = r.cloneNode(!0);
      o.appendChild(g), r.setAttribute("slot", a.name.BREADCRUMB_COPY);
    }
  }
  return s.hero({
    ...t,
    pronouns: t.slotThreeItalic,
    breadcrumbDesktop: c(a.name.BREADCRUMB),
    breadcrumbMobile: c(a.name.BREADCRUMB_COPY)
  });
}, b = m.webComponent({
  tagName: T,
  slots: k,
  createComponent: y
}), P = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  PersonBio: p,
  PersonDisplay: u,
  PersonHero: b,
  bio: p,
  display: u,
  hero: b
}, Symbol.toStringTag, { value: "Module" }));
export {
  p as P,
  u as a,
  b,
  P as p
};
//# sourceMappingURL=index-wObuJB18.js.map
