import { footer as d } from "@universityofmaryland/web-elements-library/composite";
import { Register as C, Attributes as l, Slots as t } from "@universityofmaryland/web-model-library";
const O = "umd-element-footer", s = {
  CONTACT_HEADLINE: "contact-headline",
  CONTACT_LINKS: "contact-links",
  SOCIAL: "social-links",
  UTILITY: "utility-links",
  LINK_COLUMN_ONE: "link-column-one",
  LINK_COLUMN_TWO: "link-column-two",
  LINK_COLUMN_THREE: "link-column-three",
  LOGO: "logo"
}, h = {
  image: {
    allowedElements: ["img"]
  }
}, f = (o) => {
  const r = l.isType.mega({ element: o }), e = l.isType.visual({ element: o }), N = l.isVisual.campaign({ element: o }), a = o.querySelector(
    `[slot="${s.LINK_COLUMN_ONE}"]`
  ), c = o.querySelector(
    `[slot="${s.LINK_COLUMN_TWO}"]`
  ), n = o.querySelector(
    `[slot="${s.LINK_COLUMN_THREE}"]`
  ), g = o.hasAttribute("role"), p = o.hasAttribute("aria-label"), i = [];
  let T = l.isType.simple({ element: o });
  const u = o.querySelector(`[slot="${s.LOGO}"]`);
  u && u instanceof HTMLAnchorElement && (u.querySelector("img") || console.error("No logo element found in logo slot")), a && a.hasChildNodes() && i.push(a), c && c.hasChildNodes() && i.push(c), n && n.hasChildNodes() && i.push(n), !r && !e && (T = !0), g || o.setAttribute("role", "contentinfo"), p || o.setAttribute("aria-label", "site footer");
  const L = {
    isThemeLight: l.isTheme.light({ element: o }),
    isTypeSimple: T,
    isTypeVisual: e,
    isTypeMega: r,
    isCampaignForward: N,
    slotVisualImage: t.assets.image({ element: o }) || t.deprecated.backgroundImage({ element: o }),
    slotUtilityLinks: o.querySelector(
      `[slot="${s.UTILITY}"]`
    ),
    slotCta: t.actions.default({ element: o }) || t.deprecated.callToAction({ element: o }),
    slotLogo: o.querySelector(`[slot="${s.LOGO}"]`),
    slotAddress: t.contact.address({ element: o }) || t.deprecated.contactAddress({ element: o }),
    slotContentLinks: o.querySelector(
      `[slot="${s.CONTACT_LINKS}"]`
    ),
    slotHeadline: o.querySelector(
      `[slot="${s.CONTACT_HEADLINE}"]`
    ),
    slotSocialLinks: o.querySelector(
      `[slot="${s.SOCIAL}"]`
    ),
    slotColumns: i.length > 0 ? i : void 0
  };
  return r ? d.mega(L) : e ? d.visual(L) : d.simple(L);
}, I = C.webComponent({
  tagName: O,
  slots: h,
  createComponent: f
});
var _ = I;
export {
  _ as o
};
//# sourceMappingURL=options-cJSAly_v.js.map
