"use strict";
(globalThis["webpackChunkcore_nga"] = globalThis["webpackChunkcore_nga"] || []).push([["44"], {
392: (function (__unused_webpack_module, exports, __webpack_require__) {
/**
 * @license React
 * react-compiler-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */


var ReactSharedInternals =
  (__webpack_require__(253)/* .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE */.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE);
exports.c = function (size) {
  return ReactSharedInternals.H.useMemoCache(size);
};


}),
631: (function (__unused_webpack_module, exports) {
/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */


var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
  REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
function jsxProd(type, config, maybeKey) {
  var key = null;
  void 0 !== maybeKey && (key = "" + maybeKey);
  void 0 !== config.key && (key = "" + config.key);
  if ("key" in config) {
    maybeKey = {};
    for (var propName in config)
      "key" !== propName && (maybeKey[propName] = config[propName]);
  } else maybeKey = config;
  config = maybeKey.ref;
  return {
    $$typeof: REACT_ELEMENT_TYPE,
    type: type,
    key: key,
    ref: void 0 !== config ? config : null,
    props: maybeKey
  };
}
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsx = jsxProd;
exports.jsxs = jsxProd;


}),
827: (function (module, __unused_webpack_exports, __webpack_require__) {
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */



if (true) {
  module.exports = __webpack_require__(392);
} else {}


}),
893: (function (module, __unused_webpack_exports, __webpack_require__) {


if (true) {
  module.exports = __webpack_require__(631);
} else {}


}),
278: (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
  "default": () => (NgRatingSearchableSelect)
});
/* ESM import */var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893);
/* ESM import */var react_compiler_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(827);


function mapNgRatingString(s) {
    switch(s){
        case 'e':
            return 'Everyone';
        case 't':
            return 'Teen';
        case 'm':
            return 'Mature';
        case 'a':
            return 'Adult';
        case 'u':
            return 'Unknown';
        default:
            return s;
    }
}
const genSelectItem = (missing)=>{
    return {
        value: missing,
        orderVal: `zzzzzzz${missing}`
    };
};
function NgRatingSearchableSelect(props) {
    const $ = (0,react_compiler_runtime__WEBPACK_IMPORTED_MODULE_1__.c)(22);
    const { SearchableSelect } = window.ext.components;
    const { onBlacklistFactory, onWhitelistFactory, onClearFactory, onSetAndToggleFactory } = window.ext.utils.search;
    const { advancedFilter, setAdvancedFilter } = props;
    const extFilter = advancedFilter.ext.toggles.nga;
    const extAndToggles = advancedFilter.andToggles.ext.nga;
    const labelRenderer = _temp;
    let t0;
    if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
        t0 = [
            {
                value: "e",
                orderVal: "1"
            },
            {
                value: "t",
                orderVal: "2"
            },
            {
                value: "m",
                orderVal: "3"
            },
            {
                value: "a",
                orderVal: "4"
            },
            {
                value: "u",
                orderVal: "5"
            }
        ];
        $[0] = t0;
    } else {
        t0 = $[0];
    }
    const ratingItems = t0;
    let t1;
    if ($[1] !== advancedFilter || $[2] !== setAdvancedFilter) {
        t1 = onWhitelistFactory("nga", "rating", advancedFilter, setAdvancedFilter);
        $[1] = advancedFilter;
        $[2] = setAdvancedFilter;
        $[3] = t1;
    } else {
        t1 = $[3];
    }
    const onWhitelist = t1;
    let t2;
    if ($[4] !== advancedFilter || $[5] !== setAdvancedFilter) {
        t2 = onBlacklistFactory("nga", "rating", advancedFilter, setAdvancedFilter);
        $[4] = advancedFilter;
        $[5] = setAdvancedFilter;
        $[6] = t2;
    } else {
        t2 = $[6];
    }
    const onBlacklist = t2;
    let t3;
    if ($[7] !== advancedFilter || $[8] !== setAdvancedFilter) {
        t3 = onClearFactory("nga", "rating", advancedFilter, setAdvancedFilter);
        $[7] = advancedFilter;
        $[8] = setAdvancedFilter;
        $[9] = t3;
    } else {
        t3 = $[9];
    }
    const onClear = t3;
    let t4;
    if ($[10] !== advancedFilter || $[11] !== setAdvancedFilter) {
        t4 = onSetAndToggleFactory("nga", "rating", advancedFilter, setAdvancedFilter);
        $[10] = advancedFilter;
        $[11] = setAdvancedFilter;
        $[12] = t4;
    } else {
        t4 = $[12];
    }
    const onSetAndToggle = t4;
    const andToggle = !!extAndToggles?.rating;
    let t5;
    if ($[13] !== extFilter?.rating) {
        t5 = extFilter?.rating || {};
        $[13] = extFilter?.rating;
        $[14] = t5;
    } else {
        t5 = $[14];
    }
    const selected = t5;
    let t6;
    if ($[15] !== andToggle || $[16] !== onBlacklist || $[17] !== onClear || $[18] !== onSetAndToggle || $[19] !== onWhitelist || $[20] !== selected) {
        t6 = /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SearchableSelect, {
            title: "NG Rating",
            items: ratingItems,
            andToggle: andToggle,
            selected: selected,
            labelRenderer: labelRenderer,
            generateItem: genSelectItem,
            onWhitelist: onWhitelist,
            onBlacklist: onBlacklist,
            onClear: onClear,
            onSetAndToggle: onSetAndToggle,
            mapName: _temp2
        });
        $[15] = andToggle;
        $[16] = onBlacklist;
        $[17] = onClear;
        $[18] = onSetAndToggle;
        $[19] = onWhitelist;
        $[20] = selected;
        $[21] = t6;
    } else {
        t6 = $[21];
    }
    return t6;
}
function _temp2(item_0) {
    switch(item_0){
        case "e":
            {
                return "Everyone";
            }
        case "t":
            {
                return "Teen";
            }
        case "m":
            {
                return "Mature";
            }
        case "a":
            {
                return "Adult";
            }
        case "u":
            {
                return "Unknown";
            }
        default:
            {
                return "";
            }
    }
}
function _temp(item) {
    const label = mapNgRatingString(item.value);
    return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
        className: "platform-label-row",
        children: [
            /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
                className: `dropdown-icon dropdown-icon-image ng-image-rating_${item.value}`
            }),
            /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
                className: "searchable-select-dropdown-item-title",
                children: label
            })
        ]
    });
}


}),

}]);