"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.memberJungleMemberHandler = void 0;
const core_1 = require("@roomstay/core");
const react_1 = __importDefault(require("react"));
const react_i18next_1 = require("react-i18next");
const FamilyNameMemberModal_1 = __importDefault(require("../../components/members/SignInModal/FamilyNameMemberModal"));
const RoomstayThemeEngine_1 = __importDefault(require("../../providers/RoomstayThemeEngine"));
const Translation_1 = require("../../translations/Translation");
const memberJungleMemberHandler = (hotel) => {
    var _a, _b, _c;
    const { t } = (0, react_i18next_1.useTranslation)();
    return {
        provider: core_1.EMembershipProvider.MemberJungle,
        isAvailable: (_b = (_a = hotel === null || hotel === void 0 ? void 0 : hotel.integrations) === null || _a === void 0 ? void 0 : _a.includes(core_1.EIntegration.MemberJungle)) !== null && _b !== void 0 ? _b : false,
        renderSignInModal: () => {
            var _a, _b;
            return (react_1.default.createElement(FamilyNameMemberModal_1.default, { title: t(Translation_1.Translation.ExternalMemberPopup.MemberJungleTitle), image: ((_a = hotel === null || hotel === void 0 ? void 0 : hotel.memberOnlyModalImages) === null || _a === void 0 ? void 0 : _a[core_1.EMembershipProvider.MemberJungle]) || (hotel === null || hotel === void 0 ? void 0 : hotel.memberOnlyModalImage) || RoomstayThemeEngine_1.default.getImageAssetUrl('member-jungle.png'), isOpen: true, imageSize: (_b = hotel === null || hotel === void 0 ? void 0 : hotel.memberOnlyModalImageSize) !== null && _b !== void 0 ? _b : 'none', provider: core_1.EMembershipProvider.MemberJungle }));
        },
        memberOnlyImage: ((_c = hotel === null || hotel === void 0 ? void 0 : hotel.memberOnlyImages) === null || _c === void 0 ? void 0 : _c[core_1.EMembershipProvider.MemberJungle]) || (hotel === null || hotel === void 0 ? void 0 : hotel.memberOnlyImage) || RoomstayThemeEngine_1.default.getImageAssetUrl('member-jungle.png'),
        title: t(Translation_1.Translation.ExternalMemberPopup.MemberJungleTitle),
        name: t(Translation_1.Translation.Step.Room.RoomInfo.MemberOnlyRow.MemberJungle),
    };
};
exports.memberJungleMemberHandler = memberJungleMemberHandler;
//# sourceMappingURL=MemberJungleMemberHandler.js.map