"use strict";

var _define = require("../preactement/define");
var _Alert = require("../../Alert");
var _analytics = require("../shared-attributes/analytics");
var _jsxRuntime = require("preact/compat/jsx-runtime");
const attributes = ['class-name', 'heading', 'heading-id', 'hide-icon', 'role', 'weight', 'variation', 'root-id', ..._analytics.analyticsAttrs];
const Wrapper = _ref => {
  let {
    analytics,
    hideIcon,
    rootId,
    ...otherProps
  } = _ref;
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Alert.Alert, {
    ...otherProps,
    analytics: analytics && Boolean(JSON.parse(analytics)),
    hideIcon: hideIcon && Boolean(JSON.parse(hideIcon)),
    id: rootId
  });
};
(0, _define.define)('ds-alert', () => Wrapper, {
  attributes,
  events: ['onAnalyticsEvent']
});