"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.renderBookingWizard = void 0;
exports.default = BookingWizardEngineElement;
const contexts_1 = require("../../contexts/index.js");
const react_1 = __importDefault(require("react"));
const react_dom_1 = require("react-dom");
const BookingWizard_1 = __importDefault(require("../../components/generic/BookingWizard/BookingWizard"));
function BookingWizardEngineElement({ engine }) {
    const engineConfig = engine.getConfig();
    const bwProps = {
        layout: engineConfig.layout,
        theme: engineConfig.theme,
        useMobileButtonLayout: engineConfig.useMobileButtonLayout,
        properties: engineConfig.properties,
        selectedProperty: engineConfig.selectedProperty,
        defaultColors: engineConfig.defaultColors,
        wrapperClassname: engineConfig.wrapperClassname,
        contentClassname: engineConfig.contentClassname,
        maxAdults: engineConfig.maxAdults,
        disableChild: engineConfig.disableChild,
        showInfants: engineConfig.showInfants,
        disableRoom: engineConfig.disableRoom,
        defaultValues: engineConfig.defaultValues,
        hideGuestSelect: engineConfig.hideGuestSelect,
        hidePromocode: engineConfig.hidePromocode,
        hideProperty: engineConfig.hideProperty,
        dateFormat: engineConfig.dateFormat,
        onSubmit: engineConfig.onSubmit,
        overlayDirection: engineConfig.overlayDirection,
        startsWeekOnDay: engineConfig.startsWeekOnDay,
    };
    // TODO: This will be updated to be configurable (border sizing, padding, etc)
    // const widgetType = engineConfig.widgetType;
    return (react_1.default.createElement(contexts_1.BookingEngineContextWrapper, { engine: engine },
        react_1.default.createElement(BookingWizard_1.default, Object.assign({}, bwProps))));
}
const renderBookingWizard = (container, engine) => {
    (0, react_dom_1.render)(react_1.default.createElement(BookingWizardEngineElement, { engine: engine }), container);
};
exports.renderBookingWizard = renderBookingWizard;
//# sourceMappingURL=BookingWizardEngineElement.js.map