import { define } from '../preactement/define';
import { Alert } from '../../Alert';
import { analyticsAttrs } from '../shared-attributes/analytics';
import { jsx as _jsx } from "react/jsx-runtime";
const attributes = ['class-name', 'heading', 'heading-id', 'hide-icon', 'role', 'weight', 'variation', 'root-id', ...analyticsAttrs];
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']
});