import { person as s } from "@universityofmaryland/web-elements-library/composite";
import { createStyledSlotOrClone as d, createSlot as r } from "@universityofmaryland/web-utilities-library/elements";
import { Slots as a, Register as c, Attributes as n } from "@universityofmaryland/web-model-library";
import * as p from "@universityofmaryland/web-utilities-library/validation";
import u from "@universityofmaryland/web-model-library/slots";
const i = ({
  element: o,
  isThemeDark: t
}) => ({
  address: a.contact.address({ element: o }),
  association: a.person.association({ element: o }),
  name: a.person.name({ element: o }),
  email: u.contact.email({ element: o }),
  job: a.person.jobTitle({ element: o }),
  pronouns: a.person.pronouns({ element: o }),
  phone: a.contact.phone({ element: o }),
  linkendIn: a.social.linkedin({ element: o }),
  image: p.getValidatedSlotImage({
    element: o,
    slotName: a.name.assets.image
  }),
  additionalContact: a.contact.additional({ element: o }),
  subText: a.text.subText({ element: o }),
  actions: a.actions.default({ element: o }),
  isThemeDark: t
}), b = "umd-element-person-bio", C = {
  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
}, E = (o) => {
  const t = n.isTheme.dark({ element: o });
  return n.isLayout.fullImage({ element: o }) ? s.bio.full({
    ...i({ element: o, isThemeDark: t }),
    description: d({
      element: o,
      slotRef: a.name.DESCRIPTION
    })
  }) : s.bio.small({
    ...i({ element: o, isThemeDark: t }),
    description: d({
      element: o,
      slotRef: a.name.DESCRIPTION
    })
  });
}, g = c.webComponent({
  tagName: b,
  slots: C,
  createComponent: E
});
var P = g;
const w = "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
}, D = (o) => {
  const t = n.isDisplay.list({ element: o }), l = n.isDisplay.tabular({ element: o }), e = n.isTheme.dark({ element: o });
  return t ? s.list(i({ element: o, isThemeDark: e })) : l ? s.tabular(i({ element: o, isThemeDark: e })) : s.block(i({ element: o, isThemeDark: e }));
}, h = c.webComponent({
  tagName: w,
  slots: f,
  createComponent: D
});
var $ = h;
const R = "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"] }
}, T = (o) => {
  const t = n.isTheme.dark({
    element: o
  });
  if (r(a.name.BREADCRUMB)) {
    const e = o.querySelector(
      `[slot="${a.name.BREADCRUMB}"]`
    );
    if (e) {
      const m = e.cloneNode(!0);
      o.appendChild(m), e.setAttribute("slot", a.name.BREADCRUMB_COPY);
    }
  }
  return s.hero({
    ...i({ element: o, isThemeDark: t }),
    breadcrumbDesktop: r(a.name.BREADCRUMB),
    breadcrumbMobile: r(a.name.BREADCRUMB_COPY)
  });
}, B = c.webComponent({
  tagName: R,
  slots: k,
  createComponent: T
});
var x = B;
export {
  P as b,
  $ as d,
  x as h
};
//# sourceMappingURL=hero-CJSHG7uN.js.map
