exports.id = 218;
exports.ids = [218];
exports.modules = {

/***/ 9235:
/***/ ((module) => {

// Exports
module.exports = {
	"center": "ProductListItem_center__ViRXQ",
	"paper": "ProductListItem_paper__ZlMlH",
	"styledScrollBarList": "ProductListItem_styledScrollBarList__knRMz",
	"page": "ProductListItem_page__ycxMG",
	"pageHeader": "ProductListItem_pageHeader__Tdflz",
	"pageContent": "ProductListItem_pageContent__nWWlv",
	"pageTitle": "ProductListItem_pageTitle__kiyvN",
	"customIcon": "ProductListItem_customIcon__6aKj0",
	"container": "ProductListItem_container__KXgVZ",
	"listItem": "ProductListItem_listItem__ZWeLD",
	"list": "ProductListItem_list__laZBu",
	"listContent": "ProductListItem_listContent__1u9Iy",
	"itemMain": "ProductListItem_itemMain__BbwyI",
	"itemImage": "ProductListItem_itemImage__c425a",
	"itemMainInfo": "ProductListItem_itemMainInfo__u_Sjv",
	"itemTitle": "ProductListItem_itemTitle__oIjs6",
	"ellipsis": "ProductListItem_ellipsis__DRGJv",
	"listItemActions": "ProductListItem_listItemActions___vQLk",
	"priceBlock": "ProductListItem_priceBlock__Em3Xv",
	"price": "ProductListItem_price__H_cA8",
	"oldPrice": "ProductListItem_oldPrice__VvHU5",
	"filter": "ProductListItem_filter__ixi82",
	"pageActions": "ProductListItem_pageActions__EZhoS",
	"filterDrawer": "ProductListItem_filterDrawer__EaAgt",
	"filterHeader": "ProductListItem_filterHeader__uRV2i",
	"attributeFilterButton": "ProductListItem_attributeFilterButton__88KLe",
	"listHeader": "ProductListItem_listHeader__9kCvl"
};


/***/ }),

/***/ 3321:
/***/ ((module) => {

// Exports
module.exports = {
	"center": "ReviewListItem_center__cVkAG",
	"paper": "ReviewListItem_paper__ef_tI",
	"styledScrollBarList": "ReviewListItem_styledScrollBarList__CB5Ux",
	"page": "ReviewListItem_page__38PuZ",
	"pageHeader": "ReviewListItem_pageHeader____ywX",
	"pageContent": "ReviewListItem_pageContent__hSa9v",
	"pageTitle": "ReviewListItem_pageTitle__hstTG",
	"customIcon": "ReviewListItem_customIcon__n70Iz",
	"listItem": "ReviewListItem_listItem__zLxa0",
	"embedded": "ReviewListItem_embedded__PoLGa",
	"itemTitle": "ReviewListItem_itemTitle__loujc",
	"itemMain": "ReviewListItem_itemMain__kOMJu",
	"itemImage": "ReviewListItem_itemImage__9QIyf",
	"itemMainInfo": "ReviewListItem_itemMainInfo__Z_tIb",
	"itemSubInfo": "ReviewListItem_itemSubInfo__2mEPk",
	"itemAuthor": "ReviewListItem_itemAuthor__Qf8gC",
	"itemPublished": "ReviewListItem_itemPublished__yNzn_",
	"itemCreate": "ReviewListItem_itemCreate__Mqaf0",
	"address": "ReviewListItem_address__NkyVA",
	"listItemActions": "ReviewListItem_listItemActions__wz08v",
	"createDate": "ReviewListItem_createDate__9pO4n",
	"status": "ReviewListItem_status__uCwJr",
	"title": "ReviewListItem_title__lh8cX",
	"itemToView": "ReviewListItem_itemToView__10p9K",
	"itemToViewHeader": "ReviewListItem_itemToViewHeader__xtbl1",
	"userName": "ReviewListItem_userName__iQKUD",
	"description": "ReviewListItem_description__hFDOK",
	"approveBtn": "ReviewListItem_approveBtn__kOL81",
	"productToView": "ReviewListItem_productToView__u93qf",
	"rating": "ReviewListItem_rating__U_Kyw"
};


/***/ }),

/***/ 6149:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2322);
/* harmony import */ var _cromwell_core_frontend__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4536);
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5692);
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_mui_material__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7915);
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6689);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var react_redux_ts__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9378);
/* harmony import */ var react_redux_ts__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_redux_ts__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4661);
/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react_router_dom__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _constants_PageInfos__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(379);
/* harmony import */ var _styles_common_module_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(1490);
/* harmony import */ var _styles_common_module_scss__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_styles_common_module_scss__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var _ProductListItem_module_scss__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(9235);
/* harmony import */ var _ProductListItem_module_scss__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_ProductListItem_module_scss__WEBPACK_IMPORTED_MODULE_8__);










const mapStateToProps = (state)=>{
    return {
        selectedItems: state.selectedItems,
        allSelected: state.allSelected
    };
};
const ProductListItem = (props)=>{
    const cstore = (0,_cromwell_core_frontend__WEBPACK_IMPORTED_MODULE_1__.getCStore)();
    const { data  } = props;
    if (!props.data) return null;
    let selected = false;
    if (props.allSelected && !props.selectedItems[data.id]) selected = true;
    if (!props.allSelected && props.selectedItems[data.id]) selected = true;
    return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mui_material__WEBPACK_IMPORTED_MODULE_2__.Grid, {
        container: true,
        className: (_ProductListItem_module_scss__WEBPACK_IMPORTED_MODULE_8___default().listItem),
        children: [
            /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mui_material__WEBPACK_IMPORTED_MODULE_2__.Grid, {
                item: true,
                xs: 8,
                className: (_ProductListItem_module_scss__WEBPACK_IMPORTED_MODULE_8___default().itemMain),
                children: [
                    !props.embedded && /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
                        className: (_styles_common_module_scss__WEBPACK_IMPORTED_MODULE_9___default().center),
                        children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_mui_material__WEBPACK_IMPORTED_MODULE_2__.Checkbox, {
                            checked: selected,
                            onChange: ()=>props.listItemProps.toggleSelection(data)
                        })
                    }),
                    /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
                        style: {
                            backgroundImage: `url(${props?.data?.mainImage})`
                        },
                        className: (_ProductListItem_module_scss__WEBPACK_IMPORTED_MODULE_8___default().itemImage)
                    }),
                    /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
                        className: (_ProductListItem_module_scss__WEBPACK_IMPORTED_MODULE_8___default().itemMainInfo),
                        children: [
                            /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("p", {
                                className: (_ProductListItem_module_scss__WEBPACK_IMPORTED_MODULE_8___default().itemTitle),
                                children: props.data?.name
                            }),
                            /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
                                className: (_ProductListItem_module_scss__WEBPACK_IMPORTED_MODULE_8___default().priceBlock),
                                children: [
                                    data?.oldPrice !== undefined && data?.oldPrice !== null && /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("p", {
                                        className: (_ProductListItem_module_scss__WEBPACK_IMPORTED_MODULE_8___default().oldPrice),
                                        children: cstore.getPriceWithCurrency(data.oldPrice)
                                    }),
                                    /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("p", {
                                        className: (_ProductListItem_module_scss__WEBPACK_IMPORTED_MODULE_8___default().price),
                                        children: cstore.getPriceWithCurrency(data?.price)
                                    })
                                ]
                            })
                        ]
                    })
                ]
            }),
            /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mui_material__WEBPACK_IMPORTED_MODULE_2__.Grid, {
                item: true,
                xs: 2,
                children: [
                    /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("p", {
                        className: (_ProductListItem_module_scss__WEBPACK_IMPORTED_MODULE_8___default().itemTitle),
                        children: props.data?.stockStatus ?? "In stock"
                    }),
                    /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("p", {
                        style: {
                            fontSize: "14px"
                        },
                        className: (_ProductListItem_module_scss__WEBPACK_IMPORTED_MODULE_8___default().ellipsis),
                        children: props.data?.sku
                    })
                ]
            }),
            /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mui_material__WEBPACK_IMPORTED_MODULE_2__.Grid, {
                item: true,
                xs: 2,
                className: (_ProductListItem_module_scss__WEBPACK_IMPORTED_MODULE_8___default().listItemActions),
                children: [
                    /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(react_router_dom__WEBPACK_IMPORTED_MODULE_6__.Link, {
                        to: `${_constants_PageInfos__WEBPACK_IMPORTED_MODULE_7__/* .productPageInfo.baseRoute */ .On.baseRoute}/${props.data?.id}`,
                        children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_mui_material__WEBPACK_IMPORTED_MODULE_2__.IconButton, {
                            "aria-label": "edit",
                            children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_mui_icons_material__WEBPACK_IMPORTED_MODULE_3__.Edit, {})
                        })
                    }),
                    !props.embedded && /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_mui_material__WEBPACK_IMPORTED_MODULE_2__.IconButton, {
                        "aria-label": "delete",
                        onClick: ()=>props.listItemProps.handleDeleteProductBtnClick(props.data),
                        children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_mui_icons_material__WEBPACK_IMPORTED_MODULE_3__.DeleteForever, {})
                    })
                ]
            })
        ]
    });
};
const connectedComponent = (0,react_redux_ts__WEBPACK_IMPORTED_MODULE_5__.connect)(mapStateToProps)(ProductListItem);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (connectedComponent);


/***/ }),

/***/ 2218:
/***/ ((module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ ProductReviewTable)
/* harmony export */ });
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2322);
/* harmony import */ var _cromwell_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1815);
/* harmony import */ var _cromwell_core_frontend__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4536);
/* harmony import */ var _heroicons_react_24_outline__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2135);
/* harmony import */ var _heroicons_react_24_outline__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_heroicons_react_24_outline__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5692);
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_material__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6689);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _components_buttons_IconButton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4137);
/* harmony import */ var _components_entity_entityTable_EntityTable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(256);
/* harmony import */ var _components_modal_Modal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(248);
/* harmony import */ var _components_toast_toast__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(9035);
/* harmony import */ var _constants_PageInfos__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(379);
/* harmony import */ var _helpers_time__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(1454);
/* harmony import */ var _ProductListItem__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(6149);
/* harmony import */ var _ReviewListItem_module_scss__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(3321);
/* harmony import */ var _ReviewListItem_module_scss__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_ReviewListItem_module_scss__WEBPACK_IMPORTED_MODULE_13__);
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_components_entity_entityTable_EntityTable__WEBPACK_IMPORTED_MODULE_7__, _components_toast_toast__WEBPACK_IMPORTED_MODULE_9__, _helpers_time__WEBPACK_IMPORTED_MODULE_11__]);
([_components_entity_entityTable_EntityTable__WEBPACK_IMPORTED_MODULE_7__, _components_toast_toast__WEBPACK_IMPORTED_MODULE_9__, _helpers_time__WEBPACK_IMPORTED_MODULE_11__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);














function ProductReviewTable() {
    const client = (0,_cromwell_core_frontend__WEBPACK_IMPORTED_MODULE_2__.getGraphQLClient)();
    const [itemToView, setItemToView] = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(null);
    const approvedToast = (0,react__WEBPACK_IMPORTED_MODULE_5__.useRef)(null);
    const [productToView, setProductToView] = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(null);
    const entityListPageRef = (0,react__WEBPACK_IMPORTED_MODULE_5__.useRef)(null);
    const ellipsisStyle = {
        whiteSpace: "nowrap",
        overflow: "hidden",
        textOverflow: "ellipsis"
    };
    const handleApproveReview = async (data, changeData)=>{
        const review = await client.getProductReviewById(data.id);
        try {
            await client?.updateProductReview(data.id, {
                productId: review.productId,
                title: review.title,
                description: review.description,
                rating: review.rating,
                userName: review.userName,
                userId: review.userId,
                approved: true
            });
            if (approvedToast.current) {
                _components_toast_toast__WEBPACK_IMPORTED_MODULE_9__/* .toast.dismiss */ .A.dismiss(approvedToast.current);
            }
            approvedToast.current = _components_toast_toast__WEBPACK_IMPORTED_MODULE_9__/* .toast.success */ .A.success("Approved!");
            changeData?.({
                ...data,
                approved: true
            });
            return true;
        } catch (e) {
            _components_toast_toast__WEBPACK_IMPORTED_MODULE_9__/* .toast.error */ .A.error("Failed to save");
            console.error(e);
            return false;
        }
    };
    const handleOpenReview = async (data)=>{
        const review = await client.getProductReviewById(data.id);
        const product = await client.getProductById(review.productId);
        setItemToView(review);
        if (product) {
            setProductToView(product);
        }
    };
    return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
        children: [
            /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_components_entity_entityTable_EntityTable__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, {
                entityCategory: _cromwell_core__WEBPACK_IMPORTED_MODULE_1__.EDBEntity.ProductReview,
                entityListRoute: _constants_PageInfos__WEBPACK_IMPORTED_MODULE_10__/* .reviewListPageInfo.route */ .l7.route,
                listLabel: "Product reviews",
                entityLabel: "Review",
                hideAddNew: true,
                getMany: client.getProductReviews,
                deleteOne: client.deleteProductReview,
                deleteMany: client.deleteManyProductReviews,
                getPageListInstance: (inst)=>{
                    entityListPageRef.current = inst;
                },
                columns: [
                    {
                        name: "userName",
                        label: "Name",
                        type: "Simple text",
                        visible: true
                    },
                    {
                        name: "rating",
                        label: "Rating",
                        type: "Rating",
                        visible: true,
                        exactSearch: true
                    },
                    {
                        name: "createDate",
                        label: "Created",
                        type: "Datetime",
                        visible: true,
                        getValueView: (value)=>(0,_helpers_time__WEBPACK_IMPORTED_MODULE_11__/* .formatTimeAgo */ .BK)(value)
                    },
                    {
                        name: "productId",
                        label: "Product ID",
                        type: "Simple text",
                        exactSearch: true,
                        visible: true
                    },
                    {
                        name: "approved",
                        label: "Status",
                        type: "Simple text",
                        visible: true,
                        exactSearch: true,
                        searchOptions: [
                            {
                                label: "Approved",
                                value: true
                            },
                            {
                                label: "Pending",
                                value: false
                            }
                        ],
                        getValueView: (value)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("p", {
                                style: ellipsisStyle,
                                className: (_ReviewListItem_module_scss__WEBPACK_IMPORTED_MODULE_13___default().status),
                                children: [
                                    value ? /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_heroicons_react_24_outline__WEBPACK_IMPORTED_MODULE_3__.CheckIcon, {}) : /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_heroicons_react_24_outline__WEBPACK_IMPORTED_MODULE_3__.ClockIcon, {}),
                                    " ",
                                    value ? "Approved" : "Pending"
                                ]
                            })
                    },
                    {
                        name: "id",
                        label: "ID",
                        type: "Simple text",
                        exactSearch: true,
                        visible: false
                    },
                    {
                        name: "title",
                        label: "Title",
                        type: "Simple text",
                        visible: false
                    },
                    {
                        name: "userEmail",
                        label: "Email",
                        type: "Simple text",
                        visible: false
                    },
                    {
                        name: "userId",
                        label: "User ID",
                        type: "Simple text",
                        visible: false
                    },
                    {
                        name: "updateDate",
                        label: "Updated",
                        type: "Datetime",
                        visible: false,
                        getValueView: (value)=>(0,_helpers_time__WEBPACK_IMPORTED_MODULE_11__/* .formatTimeAgo */ .BK)(value)
                    }
                ],
                customElements: {
                    getItemCustomActions: ({ data , changeData  })=>{
                        return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mui_material__WEBPACK_IMPORTED_MODULE_4__.Box, {
                            display: "flex",
                            alignItems: "center",
                            children: [
                                !data?.approved && /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_mui_material__WEBPACK_IMPORTED_MODULE_4__.Tooltip, {
                                    title: "Approve",
                                    children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("span", {
                                        children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_components_buttons_IconButton__WEBPACK_IMPORTED_MODULE_6__/* .IconButton */ .h, {
                                            onClick: ()=>handleApproveReview(data, changeData),
                                            children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_heroicons_react_24_outline__WEBPACK_IMPORTED_MODULE_3__.CheckBadgeIcon, {
                                                className: "h-4 text-gray-300 w-4 cursor-pointer"
                                            })
                                        })
                                    })
                                }),
                                /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_mui_material__WEBPACK_IMPORTED_MODULE_4__.Tooltip, {
                                    title: "Open",
                                    children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("span", {
                                        children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_components_buttons_IconButton__WEBPACK_IMPORTED_MODULE_6__/* .IconButton */ .h, {
                                            onClick: ()=>handleOpenReview(data),
                                            children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_heroicons_react_24_outline__WEBPACK_IMPORTED_MODULE_3__.BookOpenIcon, {
                                                className: "h-4 text-gray-300 w-4 cursor-pointer"
                                            })
                                        })
                                    })
                                })
                            ]
                        });
                    }
                },
                customActionsWidth: 80
            }),
            /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_components_modal_Modal__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, {
                open: !!itemToView,
                onClose: ()=>{
                    setItemToView(null);
                    setProductToView(null);
                },
                blurSelector: "#root",
                children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
                    className: (_ReviewListItem_module_scss__WEBPACK_IMPORTED_MODULE_13___default().itemToView),
                    children: [
                        /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
                            className: (_ReviewListItem_module_scss__WEBPACK_IMPORTED_MODULE_13___default().itemToViewHeader),
                            children: [
                                /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("p", {
                                    className: (_ReviewListItem_module_scss__WEBPACK_IMPORTED_MODULE_13___default().userName),
                                    children: itemToView?.userName
                                }),
                                /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_mui_material__WEBPACK_IMPORTED_MODULE_4__.Rating, {
                                    name: "read-only",
                                    className: (_ReviewListItem_module_scss__WEBPACK_IMPORTED_MODULE_13___default().rating),
                                    value: itemToView?.rating,
                                    precision: 0.5,
                                    readOnly: true
                                })
                            ]
                        }),
                        /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("h4", {
                            className: (_ReviewListItem_module_scss__WEBPACK_IMPORTED_MODULE_13___default().title),
                            children: itemToView?.title
                        }),
                        /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("p", {
                            className: (_ReviewListItem_module_scss__WEBPACK_IMPORTED_MODULE_13___default().description),
                            children: itemToView?.description
                        }),
                        !itemToView?.approved && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("button", {
                            onClick: async ()=>{
                                const success = await handleApproveReview(itemToView);
                                if (success) {
                                    itemToView.approved = true;
                                    setItemToView({
                                        ...itemToView
                                    });
                                    entityListPageRef.current?.resetList();
                                }
                            },
                            className: "flex items-center rounded-lg py-2 font-bold bg-indigo-600 mt-4 my-2 text-sm text-white px-3 uppercase self-center hover:bg-indigo-500 disabled:bg-gray-700",
                            children: [
                                /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_heroicons_react_24_outline__WEBPACK_IMPORTED_MODULE_3__.CheckBadgeIcon, {
                                    className: "h-5 w-5 mr-1 text-white-900 cursor-pointer"
                                }),
                                "Approve"
                            ]
                        }),
                        productToView && /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
                            className: (_ReviewListItem_module_scss__WEBPACK_IMPORTED_MODULE_13___default().productToView),
                            children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_ProductListItem__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z, {
                                embedded: true,
                                data: productToView,
                                listItemProps: {
                                    handleDeleteProductBtnClick: ()=>null,
                                    toggleSelection: ()=>null
                                }
                            })
                        })
                    ]
                })
            })
        ]
    });
}

__webpack_async_result__();
} catch(e) { __webpack_async_result__(e); } });

/***/ })

};
;