"use strict";
(globalThis["webpackChunkcore_nga"] = globalThis["webpackChunkcore_nga"] || []).push([["758"], {
10: (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
  "default": () => (NgCredits)
});
/* 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);
/* ESM import */var react_icons_fa__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(321);



const ROLE_ICONS = {
    'Artist': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaPaintBrush */._TT,
    'Author': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaPenAlt */.mvm,
    'Sound Effects': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaVolumeUp */.rxG,
    'Other': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaCog */.p4t,
    'Additional Code': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaDesktop */.lMi,
    'Miscellaneous': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaCog */.p4t,
    'Producer': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaChalkboardTeacher */.FcZ,
    'Production': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaFilm */.rHK,
    'Voice Actor': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaMicrophone */.uYL,
    'Writer': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaPenAlt */.mvm,
    'Collab Organizer': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaChalkboardTeacher */.FcZ,
    'Design': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaPencilAlt */.KHI,
    'Programming': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaDesktop */.lMi,
    'Animation': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaFilm */.rHK,
    'Additional Art': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaPaintBrush */._TT,
    'Sponsor': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaDollarSign */.RcD,
    'Director': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaChalkboardTeacher */.FcZ,
    'Music': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaMusic */.HcQ,
    'Beta Tester': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaBug */.iq7,
    'Sound': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaVolumeUp */.rxG,
    'Storyboards': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaPenAlt */.mvm,
    'Additional Animation': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaFilm */.rHK,
    'Interface Design': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaPaintBrush */._TT,
    'Original Creator': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaCrown */.CvY,
    'Distributor': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaTruck */.Hzt,
    'Engine Design': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaDesktop */.lMi,
    'Character Design': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaPencilAlt */.KHI,
    'Gameplay Design': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaPencilAlt */.KHI,
    'Backgrounds': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaPaintBrush */._TT,
    'Inspiration': react_icons_fa__WEBPACK_IMPORTED_MODULE_2__/* .FaSun */.Mei
};
function NgCredits(props) {
    const $ = (0,react_compiler_runtime__WEBPACK_IMPORTED_MODULE_1__.c)(10);
    const extData = props.game.extData?.nga;
    let t0;
    if ($[0] !== extData?.credits) {
        t0 = extData?.credits || [];
        $[0] = extData?.credits;
        $[1] = t0;
    } else {
        t0 = $[1];
    }
    const credits = t0;
    let t1;
    if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
        t1 = /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
            children: "Credits: "
        });
        $[2] = t1;
    } else {
        t1 = $[2];
    }
    let t2;
    if ($[3] !== credits || $[4] !== props) {
        let t3;
        if ($[6] !== props) {
            t3 = (credit, idx)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
                    className: "nga-credit",
                    children: [
                        credit.roles?.map(_temp),
                        /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
                            className: "nga-credt-name browse-right-sidebar__searchable",
                            onClick: ()=>{
                                props.doSearch(`developer:"${credit.name}"`);
                            },
                            children: credit.name
                        })
                    ]
                }, idx);
            $[6] = props;
            $[7] = t3;
        } else {
            t3 = $[7];
        }
        t2 = credits.map(t3);
        $[3] = credits;
        $[4] = props;
        $[5] = t2;
    } else {
        t2 = $[5];
    }
    let t3;
    if ($[8] !== t2) {
        t3 = /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
            className: "browse-right-sidebar__row",
            children: [
                t1,
                t2
            ]
        });
        $[8] = t2;
        $[9] = t3;
    } else {
        t3 = $[9];
    }
    return t3;
}
function _temp(role, idx_0) {
    if (role in ROLE_ICONS) {
        const Component = ROLE_ICONS[role];
        return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
            className: "nga-credit-icon",
            title: role,
            children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Component, {})
        }, idx_0);
    } else {
        return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
            children: role
        }, idx_0);
    }
}


}),

}]);