react-casino-roulette-updated
Version:
The best React Casino Roulette
806 lines (627 loc) • 209 kB
JavaScript
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"));
else if(typeof define === 'function' && define.amd)
define(["react"], factory);
else if(typeof exports === 'object')
exports["ReactCasinoRoulette"] = factory(require("react"));
else
root["ReactCasinoRoulette"] = factory(root["React"]);
})(this, (__WEBPACK_EXTERNAL_MODULE_react__) => {
return /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./src/components/ChipList/ChipList.css":
/*!**********************************************!*\
!*** ./src/components/ChipList/ChipList.css ***!
\**********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./src/components/ChipList/components/ChipItem.css":
/*!*********************************************************!*\
!*** ./src/components/ChipList/components/ChipItem.css ***!
\*********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./src/components/RouletteTable/Chip/Chip.css":
/*!****************************************************!*\
!*** ./src/components/RouletteTable/Chip/Chip.css ***!
\****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./src/components/RouletteTable/RouletteTable.css":
/*!********************************************************!*\
!*** ./src/components/RouletteTable/RouletteTable.css ***!
\********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./src/components/RouletteTable/RouletteTableCells.css":
/*!*************************************************************!*\
!*** ./src/components/RouletteTable/RouletteTableCells.css ***!
\*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./src/components/RouletteWheel/RouletteWheel.css":
/*!********************************************************!*\
!*** ./src/components/RouletteWheel/RouletteWheel.css ***!
\********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./src/components/RouletteWheel/RouletteWheelNumbers.css":
/*!***************************************************************!*\
!*** ./src/components/RouletteWheel/RouletteWheelNumbers.css ***!
\***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./src/components/ChipList/ChipList.tsx":
/*!**********************************************!*\
!*** ./src/components/ChipList/ChipList.tsx ***!
\**********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "ChipList": () => (/* binding */ ChipList)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _ChipList_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ChipList.css */ "./src/components/ChipList/ChipList.css");
/* harmony import */ var _components_ChipItem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/ChipItem */ "./src/components/ChipList/components/ChipItem.tsx");
var ChipList = function (_a) {
var chips = _a.chips, selectedChip = _a.selectedChip, onChipPressed = _a.onChipPressed, _b = _a.budget, budget = _b === void 0 ? -1 : _b, _c = _a.chipSize, chipSize = _c === void 0 ? 64 : _c;
if (Object.keys(chips).length === 0)
return null;
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("ul", { className: "roulette-chips-list" }, Object.entries(chips).map(function (_a) {
var value = _a[0], icon = _a[1];
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_ChipItem__WEBPACK_IMPORTED_MODULE_2__["default"], { key: value, value: value, icon: icon, chipSize: chipSize, isSelected: selectedChip === value, isDisabled: budget === -1 ? false : Number(value) > budget, onChipPressed: onChipPressed }));
})));
};
/***/ }),
/***/ "./src/components/ChipList/components/ChipItem.tsx":
/*!*********************************************************!*\
!*** ./src/components/ChipList/components/ChipItem.tsx ***!
\*********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ ChipItem)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _libs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../libs */ "./src/libs/index.ts");
/* harmony import */ var _ChipItem_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ChipItem.css */ "./src/components/ChipList/components/ChipItem.css");
/* harmony import */ var _utils_chipItem__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/chipItem */ "./src/components/ChipList/utils/chipItem.ts");
function ChipItem(_a) {
var value = _a.value, icon = _a.icon, _b = _a.chipSize, chipSize = _b === void 0 ? 64 : _b, onChipPressed = _a.onChipPressed, isSelected = _a.isSelected, isDisabled = _a.isDisabled;
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", { className: (0,_libs__WEBPACK_IMPORTED_MODULE_1__.classNames)({
'active': isSelected && !isDisabled,
'disabled': isDisabled,
}), onClick: function () { return !isDisabled && (onChipPressed === null || onChipPressed === void 0 ? void 0 : onChipPressed(value)); } },
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("img", { width: chipSize, height: chipSize, src: icon, alt: "Chip of value ".concat(value) }),
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", { style: { fontSize: (0,_utils_chipItem__WEBPACK_IMPORTED_MODULE_3__.calculateFontSize)(value, chipSize) + 'px' } }, value)));
}
/***/ }),
/***/ "./src/components/ChipList/index.ts":
/*!******************************************!*\
!*** ./src/components/ChipList/index.ts ***!
\******************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "ChipList": () => (/* reexport safe */ _ChipList__WEBPACK_IMPORTED_MODULE_0__.ChipList)
/* harmony export */ });
/* harmony import */ var _ChipList__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ChipList */ "./src/components/ChipList/ChipList.tsx");
/***/ }),
/***/ "./src/components/ChipList/utils/chipItem.ts":
/*!***************************************************!*\
!*** ./src/components/ChipList/utils/chipItem.ts ***!
\***************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "calculateFontSize": () => (/* binding */ calculateFontSize)
/* harmony export */ });
function calculateFontSize(value, chipSize) {
/*
When chipSize: 64px, the font-size: 25px, 20px or 17px based on the length of the text.
*/
// Using this formula we can estimate a size based on the label's length.
var x = Math.log(value.length) + 2.5;
// Font size should be relative to the chip's size.
return Math.floor(chipSize / x);
}
/***/ }),
/***/ "./src/components/RouletteTable/BottomBets/BottomBets.tsx":
/*!****************************************************************!*\
!*** ./src/components/RouletteTable/BottomBets/BottomBets.tsx ***!
\****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "BottomBets": () => (/* binding */ BottomBets)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../constants */ "./src/constants/index.ts");
/* harmony import */ var _utils_ChipRenderer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/ChipRenderer */ "./src/components/RouletteTable/utils/ChipRenderer.tsx");
var BOTTOM_BETS = [
{
action: _constants__WEBPACK_IMPORTED_MODULE_1__.ACTION_TYPES["1_TO_18"],
label: '1-18'
},
{
action: _constants__WEBPACK_IMPORTED_MODULE_1__.ACTION_TYPES.EVEN,
label: 'EVEN'
},
{
action: _constants__WEBPACK_IMPORTED_MODULE_1__.ACTION_TYPES.RED,
label: react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "rhomb-red" })
},
{
action: _constants__WEBPACK_IMPORTED_MODULE_1__.ACTION_TYPES.BLACK,
label: react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "rhomb-black" })
},
{
action: _constants__WEBPACK_IMPORTED_MODULE_1__.ACTION_TYPES.ODD,
label: 'ODD'
},
{
action: _constants__WEBPACK_IMPORTED_MODULE_1__.ACTION_TYPES["19_TO_36"],
label: '19-36'
},
];
var BottomBets = function () {
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, BOTTOM_BETS.map(function (x) { return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_utils_ChipRenderer__WEBPACK_IMPORTED_MODULE_2__.ChipRenderer, { cName: 'outside-section', action: x.action, highlight: x.action, betLabel: x.label, chipPosition: 'center', key: x.action })); })));
};
/***/ }),
/***/ "./src/components/RouletteTable/BottomBets/index.ts":
/*!**********************************************************!*\
!*** ./src/components/RouletteTable/BottomBets/index.ts ***!
\**********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "BottomBets": () => (/* reexport safe */ _BottomBets__WEBPACK_IMPORTED_MODULE_0__.BottomBets)
/* harmony export */ });
/* harmony import */ var _BottomBets__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BottomBets */ "./src/components/RouletteTable/BottomBets/BottomBets.tsx");
/***/ }),
/***/ "./src/components/RouletteTable/Chip/Chip.tsx":
/*!****************************************************!*\
!*** ./src/components/RouletteTable/Chip/Chip.tsx ***!
\****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Chip": () => (/* binding */ Chip)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _Chip_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Chip.css */ "./src/components/RouletteTable/Chip/Chip.css");
var __assign = (undefined && undefined.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var Chip = function (_a) {
var position = _a.position, icon = _a.icon, bet = _a.bet;
if (!bet)
return null;
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "chip ".concat(position), style: __assign({}, (icon ? { backgroundImage: "url(\"".concat(icon, "\")") } : {})) }, bet.amount));
};
/***/ }),
/***/ "./src/components/RouletteTable/Chip/index.ts":
/*!****************************************************!*\
!*** ./src/components/RouletteTable/Chip/index.ts ***!
\****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Chip": () => (/* reexport safe */ _Chip__WEBPACK_IMPORTED_MODULE_0__.Chip)
/* harmony export */ });
/* harmony import */ var _Chip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Chip */ "./src/components/RouletteTable/Chip/Chip.tsx");
/***/ }),
/***/ "./src/components/RouletteTable/Columns/Columns.tsx":
/*!**********************************************************!*\
!*** ./src/components/RouletteTable/Columns/Columns.tsx ***!
\**********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Columns": () => (/* binding */ Columns)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../constants */ "./src/constants/index.ts");
/* harmony import */ var _utils_ChipRenderer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/ChipRenderer */ "./src/components/RouletteTable/utils/ChipRenderer.tsx");
var COLUMNS = [
{
action: _constants__WEBPACK_IMPORTED_MODULE_1__.ACTION_TYPES["1ST_COLUMN"],
label: '1st'
},
{
action: _constants__WEBPACK_IMPORTED_MODULE_1__.ACTION_TYPES["2ND_COLUMN"],
label: '2nd'
},
{
action: _constants__WEBPACK_IMPORTED_MODULE_1__.ACTION_TYPES["3RD_COLUMN"],
label: '3rd'
},
];
var Columns = function () {
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, COLUMNS.map(function (x) { return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_utils_ChipRenderer__WEBPACK_IMPORTED_MODULE_2__.ChipRenderer, { cName: 'column-item', action: x.action, highlight: x.action, betLabel: x.label, chipPosition: 'center', key: x.action })); })));
};
/***/ }),
/***/ "./src/components/RouletteTable/Columns/index.ts":
/*!*******************************************************!*\
!*** ./src/components/RouletteTable/Columns/index.ts ***!
\*******************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Columns": () => (/* reexport safe */ _Columns__WEBPACK_IMPORTED_MODULE_0__.Columns)
/* harmony export */ });
/* harmony import */ var _Columns__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Columns */ "./src/components/RouletteTable/Columns/Columns.tsx");
/***/ }),
/***/ "./src/components/RouletteTable/Dozens/Dozens.tsx":
/*!********************************************************!*\
!*** ./src/components/RouletteTable/Dozens/Dozens.tsx ***!
\********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Dozens": () => (/* binding */ Dozens)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../constants */ "./src/constants/index.ts");
/* harmony import */ var _utils_ChipRenderer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/ChipRenderer */ "./src/components/RouletteTable/utils/ChipRenderer.tsx");
var DOZENS = [
{
action: _constants__WEBPACK_IMPORTED_MODULE_1__.ACTION_TYPES["1ST_DOZEN"],
label: '1-12'
},
{
action: _constants__WEBPACK_IMPORTED_MODULE_1__.ACTION_TYPES["2ND_DOZEN"],
label: '13-24'
},
{
action: _constants__WEBPACK_IMPORTED_MODULE_1__.ACTION_TYPES["3RD_DOZEN"],
label: '25-36'
},
];
var Dozens = function () {
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, DOZENS.map(function (x) { return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_utils_ChipRenderer__WEBPACK_IMPORTED_MODULE_2__.ChipRenderer, { cName: 'doz-item', action: x.action, highlight: x.action, betLabel: x.label, chipPosition: 'center', key: x.action })); })));
};
/***/ }),
/***/ "./src/components/RouletteTable/Dozens/index.ts":
/*!******************************************************!*\
!*** ./src/components/RouletteTable/Dozens/index.ts ***!
\******************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Dozens": () => (/* reexport safe */ _Dozens__WEBPACK_IMPORTED_MODULE_0__.Dozens)
/* harmony export */ });
/* harmony import */ var _Dozens__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Dozens */ "./src/components/RouletteTable/Dozens/Dozens.tsx");
/***/ }),
/***/ "./src/components/RouletteTable/NumberBets/NumberBets.tsx":
/*!****************************************************************!*\
!*** ./src/components/RouletteTable/NumberBets/NumberBets.tsx ***!
\****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "NumberBets": () => (/* binding */ NumberBets)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _Chip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Chip */ "./src/components/RouletteTable/Chip/index.ts");
/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../context */ "./src/context/index.ts");
/* harmony import */ var _config_table_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../config/table.json */ "./src/config/table.json");
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../helpers */ "./src/helpers/index.ts");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../constants */ "./src/constants/index.ts");
/* harmony import */ var _utils_ChipRenderer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/ChipRenderer */ "./src/components/RouletteTable/utils/ChipRenderer.tsx");
var NUMBERS = Array.from({ length: 36 }, function (_, i) { return i + 1; });
var NumberBets = function (_a) {
var layoutType = _a.layoutType;
var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context__WEBPACK_IMPORTED_MODULE_2__.RouletteTableContext), bets = _b.bets, chips = _b.chips;
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, NUMBERS.map(function (number) { return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { key: number, "data-action": _constants__WEBPACK_IMPORTED_MODULE_5__.ACTION_TYPES.STRAIGHT_UP, "data-bet": "".concat(number), className: "".concat(_config_table_json__WEBPACK_IMPORTED_MODULE_3__.RED.includes(number) ? 'red-item' : 'black-item') },
(0,_helpers__WEBPACK_IMPORTED_MODULE_4__.shouldRenderCornerBetCatcher)(number) &&
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_utils_ChipRenderer__WEBPACK_IMPORTED_MODULE_6__.ChipRenderer, { cName: "corner-bet-catcher", action: _constants__WEBPACK_IMPORTED_MODULE_5__.ACTION_TYPES.CORNER, highlight: "".concat(number, "-").concat(number + 1, "-").concat(number + 3, "-").concat(number + 4), chipPosition: 'right-top' }),
(number === 1) && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_utils_ChipRenderer__WEBPACK_IMPORTED_MODULE_6__.ChipRenderer, { cName: "spleet-bet-catcher", action: _constants__WEBPACK_IMPORTED_MODULE_5__.ACTION_TYPES.STREET, highlight: '0-1-2', chipPosition: 'left-top', style: { zIndex: 12 } })),
(number === 2) && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_utils_ChipRenderer__WEBPACK_IMPORTED_MODULE_6__.ChipRenderer, { cName: "spleet-bet-catcher", action: _constants__WEBPACK_IMPORTED_MODULE_5__.ACTION_TYPES.STREET, highlight: layoutType === 'american' ? "00-2-3" : '0-2-3', chipPosition: 'left-top', style: { zIndex: 12 } })),
(0,_helpers__WEBPACK_IMPORTED_MODULE_4__.shouldRenderTopCatcher)(number) && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_utils_ChipRenderer__WEBPACK_IMPORTED_MODULE_6__.ChipRenderer, { cName: "split-up-bet-catcher-top", action: _constants__WEBPACK_IMPORTED_MODULE_5__.ACTION_TYPES.SPLIT, highlight: "".concat(number, "-").concat(number + 1), chipPosition: 'center-top' })),
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "value" }, number),
(0,_helpers__WEBPACK_IMPORTED_MODULE_4__.shouldRenderChip)("".concat(number), bets) && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Chip__WEBPACK_IMPORTED_MODULE_1__.Chip, { position: "center", bet: bets[number], icon: (0,_helpers__WEBPACK_IMPORTED_MODULE_4__.findChipIcon)(bets[number], chips) })),
(0,_helpers__WEBPACK_IMPORTED_MODULE_4__.shouldRenderRightCatcher)(number) && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_utils_ChipRenderer__WEBPACK_IMPORTED_MODULE_6__.ChipRenderer, { cName: "split-up-bet-catcher-right", action: _constants__WEBPACK_IMPORTED_MODULE_5__.ACTION_TYPES.SPLIT, highlight: "".concat(number, "-").concat(number + 3), chipPosition: 'right-center' })),
(0,_helpers__WEBPACK_IMPORTED_MODULE_4__.shouldRenderBottomCatcher)(number) && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_utils_ChipRenderer__WEBPACK_IMPORTED_MODULE_6__.ChipRenderer, { cName: "split-up-bet-catcher-bottom", action: _constants__WEBPACK_IMPORTED_MODULE_5__.ACTION_TYPES.STREET, highlight: "".concat(number, "-").concat(number + 1, "-").concat(number + 2), chipPosition: 'center-bottom' })),
(0,_helpers__WEBPACK_IMPORTED_MODULE_4__.shouldRenderSixLineBetCatcher)(number) && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_utils_ChipRenderer__WEBPACK_IMPORTED_MODULE_6__.ChipRenderer, { cName: "six-lines-catcher", action: _constants__WEBPACK_IMPORTED_MODULE_5__.ACTION_TYPES.DOUBLE_STREET, highlight: "".concat(number, "-").concat(number + 1, "-").concat(number + 2, "-").concat(number + 3, "-").concat(number + 4, "-").concat(number + 5), chipPosition: 'right-bottom' })))); })));
};
/***/ }),
/***/ "./src/components/RouletteTable/NumberBets/index.ts":
/*!**********************************************************!*\
!*** ./src/components/RouletteTable/NumberBets/index.ts ***!
\**********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "NumberBets": () => (/* reexport safe */ _NumberBets__WEBPACK_IMPORTED_MODULE_0__.NumberBets)
/* harmony export */ });
/* harmony import */ var _NumberBets__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./NumberBets */ "./src/components/RouletteTable/NumberBets/NumberBets.tsx");
/***/ }),
/***/ "./src/components/RouletteTable/RouletteTable.tsx":
/*!********************************************************!*\
!*** ./src/components/RouletteTable/RouletteTable.tsx ***!
\********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "RouletteTable": () => (/* binding */ RouletteTable)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _ZeroBets__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ZeroBets */ "./src/components/RouletteTable/ZeroBets/index.ts");
/* harmony import */ var _NumberBets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./NumberBets */ "./src/components/RouletteTable/NumberBets/index.ts");
/* harmony import */ var _Columns__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Columns */ "./src/components/RouletteTable/Columns/index.ts");
/* harmony import */ var _Dozens__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Dozens */ "./src/components/RouletteTable/Dozens/index.ts");
/* harmony import */ var _BottomBets__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./BottomBets */ "./src/components/RouletteTable/BottomBets/index.ts");
/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../context */ "./src/context/index.ts");
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../constants */ "./src/constants/index.ts");
/* harmony import */ var _config_table_json__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../config/table.json */ "./src/config/table.json");
/* harmony import */ var _utills__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utills */ "./src/utills/index.ts");
/* harmony import */ var _libs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../libs */ "./src/libs/index.ts");
/* harmony import */ var _RouletteTable_css__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./RouletteTable.css */ "./src/components/RouletteTable/RouletteTable.css");
/* harmony import */ var _RouletteTableCells_css__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./RouletteTableCells.css */ "./src/components/RouletteTable/RouletteTableCells.css");
var RouletteTable = function (_a) {
var onBet = _a.onBet, bets = _a.bets, chips = _a.chips, _b = _a.layoutType, layoutType = _b === void 0 ? 'european' : _b, _c = _a.readOnly, readOnly = _c === void 0 ? false : _c, _d = _a.height, height = _d === void 0 ? '368px' : _d, isDebug = _a.isDebug;
var tableRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
if (tableRef.current === null || readOnly) {
return;
}
var listener = function (event) {
var _a, _b, _c, _d, _e, _f;
var highlightElement = (_a = event.target) === null || _a === void 0 ? void 0 : _a.closest('[data-highlight]');
var highlightData = (_b = highlightElement === null || highlightElement === void 0 ? void 0 : highlightElement.dataset) === null || _b === void 0 ? void 0 : _b.highlight;
var betElement = (_c = event.target) === null || _c === void 0 ? void 0 : _c.closest('[data-bet]');
var betData = (_d = betElement === null || betElement === void 0 ? void 0 : betElement.dataset) === null || _d === void 0 ? void 0 : _d.bet;
var action = (_f = (_e = ((highlightElement !== null && highlightElement !== void 0 ? highlightElement : betElement))) === null || _e === void 0 ? void 0 : _e.dataset) === null || _f === void 0 ? void 0 : _f.action;
if ((highlightData === undefined || highlightData === '') &&
(betData === undefined || betData === '')) {
console.error('No data in [data-bet] or [data-highlight]');
return;
}
if (action === undefined || action === '') {
console.error('Action is undefined');
return;
}
var isActionSupported = Object.keys(_constants__WEBPACK_IMPORTED_MODULE_7__.ACTION_TYPES).includes(action);
if (isActionSupported === false) {
console.error('Unsupported action', action);
return;
}
/* Checks are done */
var payloadData = (highlightData !== null && highlightData !== void 0 ? highlightData : betData);
var getPayload = function () {
var firstId = payloadData.split('-')[0];
var isPayloadInConfig = (0,_utills__WEBPACK_IMPORTED_MODULE_9__.hasOwn)(_config_table_json__WEBPACK_IMPORTED_MODULE_8__, firstId);
if (isPayloadInConfig === true) {
return _config_table_json__WEBPACK_IMPORTED_MODULE_8__[firstId].map(function (item) { return "".concat(item); });
}
return payloadData.split('-').map(function (item) { return item; });
};
var payload = getPayload();
onBet({
bet: action,
payload: payload,
id: payloadData,
});
};
tableRef.current.addEventListener('click', listener);
var tableRefCurrent = tableRef.current;
return function () {
tableRefCurrent === null || tableRefCurrent === void 0 ? void 0 : tableRefCurrent.removeEventListener('click', listener);
};
}, [onBet, readOnly]);
var doHighlight = function (betId) {
if (tableRef.current === null) {
return;
}
var hoverClass = 'item-hover';
var element = tableRef.current.querySelector("[data-bet=\"".concat(betId, "\"]"));
element === null || element === void 0 ? void 0 : element.classList.toggle(hoverClass);
};
var handleBetCatcherHover = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (event) {
var highlightData = event.currentTarget.dataset
.highlight;
var toHighlight = highlightData === null || highlightData === void 0 ? void 0 : highlightData.split('-');
var firstHighlight = toHighlight === null || toHighlight === void 0 ? void 0 : toHighlight[0];
if (firstHighlight === undefined || readOnly) {
return;
}
var isFromConfig = Object.keys(_config_table_json__WEBPACK_IMPORTED_MODULE_8__).includes(firstHighlight);
if (isFromConfig === true) {
doHighlight(firstHighlight);
if (_config_table_json__WEBPACK_IMPORTED_MODULE_8__[firstHighlight] === undefined) {
console.error('Config does not contain the key', firstHighlight);
return;
}
_config_table_json__WEBPACK_IMPORTED_MODULE_8__[firstHighlight].forEach(function (bet) {
return doHighlight("".concat(bet));
});
return;
}
toHighlight === null || toHighlight === void 0 ? void 0 : toHighlight.forEach(function (element) {
doHighlight(element);
});
}, [readOnly]);
var containerStyles = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
return {
height: height,
fontSize: "calc(".concat(height, " * 0.05)"),
'--roulette-romb-size': "calc(".concat(height, " * 0.09)"),
};
}, [height]);
var contextValue = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () { return ({ bets: bets, chips: chips, onBetCatcherHover: handleBetCatcherHover }); }, [bets, handleBetCatcherHover]);
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_context__WEBPACK_IMPORTED_MODULE_6__.RouletteTableContext.Provider, { value: contextValue },
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,_libs__WEBPACK_IMPORTED_MODULE_10__.classNames)('roulette-table-container', { debug: isDebug, 'read-only': readOnly }), style: containerStyles, ref: tableRef },
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("section", { className: "roulette-table-container-first" },
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ZeroBets__WEBPACK_IMPORTED_MODULE_1__.ZeroBets, { layoutType: layoutType }),
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_NumberBets__WEBPACK_IMPORTED_MODULE_2__.NumberBets, { layoutType: layoutType }),
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Columns__WEBPACK_IMPORTED_MODULE_3__.Columns, null)),
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("section", { className: "roulette-table-container-second" },
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Dozens__WEBPACK_IMPORTED_MODULE_4__.Dozens, null)),
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "roulette-table-container-third" },
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_BottomBets__WEBPACK_IMPORTED_MODULE_5__.BottomBets, null)))));
};
/***/ }),
/***/ "./src/components/RouletteTable/ZeroBets/ZeroBets.tsx":
/*!************************************************************!*\
!*** ./src/components/RouletteTable/ZeroBets/ZeroBets.tsx ***!
\************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "ZeroBets": () => (/* binding */ ZeroBets)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../context */ "./src/context/index.ts");
/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components */ "./src/components/RouletteTable/ZeroBets/components/index.ts");
var ZeroBets = function (_a) {
var layoutType = _a.layoutType;
var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context__WEBPACK_IMPORTED_MODULE_1__.RouletteTableContext), bets = _b.bets, chips = _b.chips;
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components__WEBPACK_IMPORTED_MODULE_2__.SingleZero, { layoutType: layoutType, bets: bets, chips: chips }),
layoutType == 'american' && react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components__WEBPACK_IMPORTED_MODULE_2__.DoubleZero, { layoutType: layoutType, bets: bets, chips: chips })));
};
/***/ }),
/***/ "./src/components/RouletteTable/ZeroBets/components/DoubleZero.tsx":
/*!*************************************************************************!*\
!*** ./src/components/RouletteTable/ZeroBets/components/DoubleZero.tsx ***!
\*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "DoubleZero": () => (/* binding */ DoubleZero)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../constants */ "./src/constants/index.ts");
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../helpers */ "./src/helpers/index.ts");
/* harmony import */ var _Chip__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Chip */ "./src/components/RouletteTable/Chip/index.ts");
/* harmony import */ var _utils_ChipRenderer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/ChipRenderer */ "./src/components/RouletteTable/utils/ChipRenderer.tsx");
function DoubleZero(_a) {
var layoutType = _a.layoutType, bets = _a.bets, chips = _a.chips;
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { key: "zero-item-00", className: "zero-item ".concat(layoutType === 'european' ? 'single-zero' : ''), "data-action": _constants__WEBPACK_IMPORTED_MODULE_1__.ACTION_TYPES["00"], "data-bet": '00' },
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_utils_ChipRenderer__WEBPACK_IMPORTED_MODULE_4__.ChipRenderer, { cName: "split-up-bet-catcher-right", action: _constants__WEBPACK_IMPORTED_MODULE_1__.ACTION_TYPES.SPLIT, highlight: "00-3", style: {
zIndex: 12,
height: '85px',
}, chipPosition: 'right-top-with-offset' }),
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_utils_ChipRenderer__WEBPACK_IMPORTED_MODULE_4__.ChipRenderer, { cName: 'split-up-bet-catcher-right', action: _constants__WEBPACK_IMPORTED_MODULE_1__.ACTION_TYPES.SPLIT, highlight: "00-2", style: { height: 85, top: 'auto', bottom: 0 }, chipPosition: 'right-bottom-with-no-offset' }),
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "value" }, "00"),
(0,_helpers__WEBPACK_IMPORTED_MODULE_2__.shouldRenderChip)('00', bets) && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Chip__WEBPACK_IMPORTED_MODULE_3__.Chip, { position: "center", bet: bets['00'], icon: (0,_helpers__WEBPACK_IMPORTED_MODULE_2__.findChipIcon)(bets['00'], chips) }))));
}
/***/ }),
/***/ "./src/components/RouletteTable/ZeroBets/components/SingleZero.tsx":
/*!*************************************************************************!*\
!*** ./src/components/RouletteTable/ZeroBets/components/SingleZero.tsx ***!
\*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "SingleZero": () => (/* binding */ SingleZero)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../constants */ "./src/constants/index.ts");
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../helpers */ "./src/helpers/index.ts");
/* harmony import */ var _Chip__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Chip */ "./src/components/RouletteTable/Chip/index.ts");
/* harmony import */ var _utils_ChipRenderer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/ChipRenderer */ "./src/components/RouletteTable/utils/ChipRenderer.tsx");
function SingleZero(_a) {
var layoutType = _a.layoutType, bets = _a.bets, chips = _a.chips;
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { key: "zero-item-0", className: "zero-item ".concat(layoutType === 'european' ? 'single-zero' : ''), "data-action": _constants__WEBPACK_IMPORTED_MODULE_1__.ACTION_TYPES[0], "data-bet": '0' },
layoutType === 'american' &&
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_utils_ChipRenderer__WEBPACK_IMPORTED_MODULE_4__.ChipRenderer, { cName: 'spleet-bet-catcher', action: _constants__WEBPACK_IMPORTED_MODULE_1__.ACTION_TYPES.STREET, highlight: '0-00-2', style: { left: 'auto', right: -15, zIndex: 13 }, chipPosition: "right-top" }),
layoutType === 'american' &&
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_utils_ChipRenderer__WEBPACK_IMPORTED_MODULE_4__.ChipRenderer, { cName: "split-up-bet-catcher-top", action: _constants__WEBPACK_IMPORTED_MODULE_1__.ACTION_TYPES.ROW, highlight: "00-0", chipPosition: "center-top" }),
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_utils_ChipRenderer__WEBPACK_IMPORTED_MODULE_4__.ChipRenderer, { cName: "split-up-bet-catcher-right", action: _constants__WEBPACK_IMPORTED_MODULE_1__.ACTION_TYPES.SPLIT, highlight: "0-2", chipPosition: layoutType === 'american' ? 'right-top-with-no-offset' : 'right-center' }),
layoutType === 'european' && react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_utils_ChipRenderer__WEBPACK_IMPORTED_MODULE_4__.ChipRenderer, { cName: "split-up-bet-catcher-right", action: _constants__WEBPACK_IMPORTED_MODULE_1__.ACTION_TYPES.SPLIT, highlight: "0-3", style: { height: 85, top: 0, bottom: 'auto' }, chipPosition: 'right-top-with-offset' }),
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_utils_ChipRenderer__WEBPACK_IMPORTED_MODULE_4__.ChipRenderer, { cName: 'split-up-bet-catcher-right', action: _constants__WEBPACK_IMPORTED_MODULE_1__.ACTION_TYPES.SPLIT, highlight: "0-1", style: { height: 85, top: 'auto', bottom: 0 }, chipPosition: 'right-bottom-with-offset' }),
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_utils_ChipRenderer__WEBPACK_IMPORTED_MODULE_4__.ChipRenderer, { cName: "basket-catcher-bottom", action: _constants__WEBPACK_IMPORTED_MODULE_1__.ACTION_TYPES.BASKET_US, highlight: layoutType === 'american' ? '00-0-1-2-3' : '0-1-2-3', style: { left: -3 }, hideChips: true }),
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_utils_ChipRenderer__WEBPACK_IMPORTED_MODULE_4__.ChipRenderer, { cName: "corner-bet-catcher bottom", action: _constants__WEBPACK_IMPORTED_MODULE_1__.ACTION_TYPES.BASKET_US, highlight: layoutType === 'american' ? '00-0-1-2-3' : '0-1-2-3', style: { zIndex: 14 }, chipPosition: 'right-bottom' }),
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "value" }, "0"),
(0,_helpers__WEBPACK_IMPORTED_MODULE_2__.shouldRenderChip)('0', bets) && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Chip__WEBPACK_IMPORTED_MODULE_3__.Chip, { position: "center", bet: bets['0'], icon: (0,_helpers__WEBPACK_IMPORTED_MODULE_2__.findChipIcon)(bets['0'], chips) }))));
}
/***/ }),
/***/ "./src/components/RouletteTable/ZeroBets/components/index.ts":
/*!*******************************************************************!*\
!*** ./src/components/RouletteTable/ZeroBets/components/index.ts ***!
\*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "DoubleZero": () => (/* reexport safe */ _DoubleZero__WEBPACK_IMPORTED_MODULE_1__.DoubleZero),
/* harmony export */ "SingleZero": () => (/* reexport safe */ _SingleZero__WEBPACK_IMPORTED_MODULE_0__.SingleZero)
/* harmony export */ });
/* harmony import */ var _SingleZero__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SingleZero */ "./src/components/RouletteTable/ZeroBets/components/SingleZero.tsx");
/* harmony import */ var _DoubleZero__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DoubleZero */ "./src/components/RouletteTable/ZeroBets/components/DoubleZero.tsx");
/***/ }),
/***/ "./src/components/RouletteTable/ZeroBets/index.ts":
/*!********************************************************!*\
!*** ./src/components/RouletteTable/ZeroBets/index.ts ***!
\********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "ZeroBets": () => (/* reexport safe */ _ZeroBets__WEBPACK_IMPORTED_MODULE_0__.ZeroBets)
/* harmony export */ });
/* harmony import */ var _ZeroBets__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ZeroBets */ "./src/components/RouletteTable/ZeroBets/ZeroBets.tsx");
/***/ }),
/***/ "./src/components/RouletteTable/index.ts":
/*!***********************************************!*\
!*** ./src/components/RouletteTable/index.ts ***!
\***********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "RouletteTable": () => (/* reexport safe */ _RouletteTable__WEBPACK_IMPORTED_MODULE_0__.RouletteTable)
/* harmony export */ });
/* harmony import */ var _RouletteTable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RouletteTable */ "./src/components/RouletteTable/RouletteTable.tsx");
/***/ }),
/***/ "./src/components/RouletteTable/utils/ChipRenderer.tsx":
/*!*************************************************************!*\
!*** ./src/components/RouletteTable/utils/ChipRenderer.tsx ***!
\*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "ChipRenderer": () => (/* binding */ ChipRenderer)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../helpers */ "./src/helpers/index.ts");
/* harmony import */ var _Chip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Chip */ "./src/components/RouletteTable/Chip/index.ts");
/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../context */ "./src/context/index.ts");
function ChipRenderer(_a) {
var cName = _a.cName, action = _a.action, highlight = _a.highlight, _b = _a.style, style = _b === void 0 ? {} : _b, _c = _a.chipPosition, chipPosition = _c === void 0 ? '' : _c, _d = _a.hideChips, hideChips = _d === void 0 ? false : _d, _e = _a.betLabel, betLabel = _e === void 0 ? '' : _e;
var _f = (0,react__WEBP