"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var React = (0, tslib_1.__importStar)(require("react"));
var PropTypes = (0, tslib_1.__importStar)(require("prop-types"));
function Slot(_a) {
    var compositeParent = _a.compositeParent, name = _a.name, className = _a.className;
    if (!compositeParent) {
        console.warn('Slot组件只能用于实现复合组件');
        // 兼容编辑器点击，可选中 Slot 组件
        return (React.createElement("div", { className: 'weda-ui' + className ? " " + className : '' }, 'Slot - ' + name));
    }
    return compositeParent.props.data[name] || null;
}
exports.default = Slot;
Slot.propTypes = {
    className: PropTypes.string,
    name: PropTypes.string,
    compositeParent: PropTypes.any,
};
//# sourceMappingURL=index.js.map