'use strict';

var tslib_es6 = require('../../../../../@rollup_plugin-typescript@11.1.1_rollup@3.25.1_tslib@2.6.3_typescript@5.4.3/node_modules/tslib/tslib.es6.cjs');
var React = require('react');

function _interopNamespaceDefault(e) {
    var n = Object.create(null);
    if (e) {
        Object.keys(e).forEach(function (k) {
            if (k !== 'default') {
                var d = Object.getOwnPropertyDescriptor(e, k);
                Object.defineProperty(n, k, d.get ? d : {
                    enumerable: true,
                    get: function () { return e[k]; }
                });
            }
        });
    }
    n.default = e;
    return Object.freeze(n);
}

var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);

var SideCar = function (_a) {
    var sideCar = _a.sideCar, rest = tslib_es6.__rest(_a, ["sideCar"]);
    if (!sideCar) {
        throw new Error('Sidecar: please provide `sideCar` property to import the right car');
    }
    var Target = sideCar.read();
    if (!Target) {
        throw new Error('Sidecar medium not found');
    }
    return React__namespace.createElement(Target, tslib_es6.__assign({}, rest));
};
SideCar.isSideCarExport = true;
function exportSidecar(medium, exported) {
    medium.useMedium(exported);
    return SideCar;
}

exports.exportSidecar = exportSidecar;
//# sourceMappingURL=exports.cjs.map
