import { actions as i } from "@universityofmaryland/web-elements-library/atomic";
import { Register as p, Attributes as e, Slots as r } from "@universityofmaryland/web-model-library";
const c = "umd-element-call-to-action", u = {
  text: {
    allowedElements: ["a", "button"]
  },
  plainText: {
    deprecated: 'Use "text" instead. This attribute will be removed in version 2.0.',
    allowedElements: ["a", "button"]
  }
}, d = (t) => {
  const o = t.querySelector("button, a:not([slot])"), a = t.querySelector(
    '[slot="plain-text"]'
  ), n = t.querySelector('[slot="text"]');
  if (!o)
    throw new Error("Component requires a button or link");
  const s = {
    element: o.cloneNode(!0),
    isTypeOutline: e.isDisplay.outline({ element: t }),
    isTypePrimary: e.isDisplay.primary({ element: t }),
    isTypeSecondary: e.isDisplay.secondary({ element: t }),
    isSizeLarge: e.isVisual.sizeLarge({ element: t }),
    isThemeDark: e.isTheme.dark({ element: t }),
    isThemeGold: e.isTheme.gold({ element: t }),
    elementStyles: e.getValue.styleProps({ element: t })
  };
  if (a || n) {
    const l = r.deprecated.plainText({ element: t }) || r.text.default({ element: t });
    return i.options({
      ...s,
      plainText: l
    });
  }
  return i.options({
    ...s
  });
}, y = p.webComponent({
  tagName: c,
  slots: u,
  createComponent: d
});
var x = y;
export {
  x as d
};
//# sourceMappingURL=display-CLcyGpEO.js.map
