/**
 * amis v3.5.1
 * build time: 2023-11-02
 * Copyright 2018-2023 baidu
 */

'use strict';

var tslib = require('tslib');
var amisCore = require('amis-core');
var React = require('react');
var amisUi = require('amis-ui');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var React__default = /*#__PURE__*/_interopDefaultLegacy(React);

var __react_jsx__ = require('react');
var _J$X_ = (__react_jsx__["default"] || __react_jsx__).createElement;
(__react_jsx__["default"] || __react_jsx__).Fragment;
/** @class */ ((function (_super) {
    tslib.__extends(TplRenderer, _super);
    function TplRenderer() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    TplRenderer.prototype.render = function () {
        var _a = this.props, render = _a.render, body = _a.body, level = _a.level, icon = _a.icon, showIcon = _a.showIcon, rest = tslib.__rest(_a, ["render", "body", "level", "icon", "showIcon"]);
        if (amisCore.isPureVariable(level)) {
            level = amisCore.resolveVariableAndFilter(level, this.props.data);
        }
        if (amisCore.isPureVariable(icon)) {
            icon = amisCore.resolveVariableAndFilter(icon, this.props.data);
        }
        if (amisCore.isPureVariable(showIcon)) {
            showIcon = amisCore.resolveVariableAndFilter(showIcon, this.props.data);
        }
        return (_J$X_(amisUi.Alert2, tslib.__assign({}, rest, { level: level, icon: icon, showIcon: showIcon }), render('body', body)));
    };
    TplRenderer = tslib.__decorate([
        amisCore.Renderer({
            type: 'alert'
        })
    ], TplRenderer);
    return TplRenderer;
})(React__default["default"].Component));
window.amisVersionInfo={version:'3.5.1',buildTime:'2023-11-02'};
