import { define } from "../preactement/define";
import { Alert } from "../../Alert";
import { analyticsOverrideAttrs } from "../shared-attributes/analytics";
import { onAnalyticsEvent } from "../analytics";
import { jsx as _jsx } from "preact/compat/jsx-runtime";
const attributes = ['class-name', 'heading', 'heading-id', 'hide-icon', 'role', 'weight', 'variation', 'root-id', ...analyticsOverrideAttrs];
const Wrapper = _ref => {
  let {
    analytics,
    hideIcon,
    rootId,
    ...otherProps
  } = _ref;
  return /*#__PURE__*/_jsx(Alert, {
    ...otherProps,
    analytics: analytics && Boolean(JSON.parse(analytics)),
    hideIcon: hideIcon && Boolean(JSON.parse(hideIcon)),
    id: rootId
  });
};
define('ds-alert', () => Wrapper, {
  attributes,
  events: [onAnalyticsEvent],
  shadow: true
});