{"version":3,"sources":["../ui/src/components/player-components/comments/commentContentPopover.tsx"],"sourcesContent":["import Image from \"next/image\";\r\nimport SingleComment from \"./singleComment\";\r\nimport AddComment from \"./addComment\";\r\nimport { useAppSelector } from \"redux-share/hooks\";\r\nimport { IComments, ConditionName, IUsersCommentsProfiles, zIndex, ICommentContentPopoverProps } from \"interfaces\";\r\nimport IMAGES from \"../../../../../images/importImages\";\r\nimport { conditions } from \"helpers\";\r\nimport { handleCommentsIdsInLocalStorage } from \"redux-share/actions/comment.action\";\r\nimport { shallowEqual } from 'react-redux';\r\nimport dynamic from \"next/dynamic\";\r\n\r\nconst TouchScreenCommentObserver = dynamic(() => import(\"./touchScreenCommentObserver\"));\r\n\r\nconst CommentContentPopover = ({ setScrollEnd }: ICommentContentPopoverProps) => {\r\n\r\n    const { replyToAuthor, comments, usersCommentsProfiles } = useAppSelector(({ comments: { replyToAuthor, comments, usersCommentsProfiles } }) => ({ replyToAuthor, comments, usersCommentsProfiles }), shallowEqual);\r\n\r\n    return (\r\n        <>\r\n            {comments.length ? (\r\n                <div className=\"pl-mb-[80px]\">\r\n                    <div className=\"pl-px-4 pl-flex pl-flex-col pl-gap-2 pl-relative\" style={{ zIndex: zIndex.comments }}>\r\n                        {comments.map((comment: IComments) => <SingleComment key={comment.id} comment={comment} user={usersCommentsProfiles.find((profile: IUsersCommentsProfiles) => profile.id === comment.author)} commentsLocalStorageIds={handleCommentsIdsInLocalStorage()} />)}\r\n                        <TouchScreenCommentObserver setScrollEnd={setScrollEnd} />\r\n                    </div>\r\n                </div>\r\n            ) : (\r\n                <div className=\"pl-w-full pl-h-full pl-flex pl-flex-col pl-justify-center pl-items-center pl-gap-[6px] pl-pb-[80px]\">\r\n                    <Image src={conditions(ConditionName.isDarkMode) ? IMAGES.commentEmptyStateBlack : IMAGES.commentEmptyStateWhite} width={216} height={98.48} />\r\n                    <p>در حال حاضر هیچ دیدگاهی وجود ندارد.</p>\r\n                </div>\r\n            )}\r\n\r\n            <AddComment type={replyToAuthor.id ? \"reply\" : \"comment\"} />\r\n        </>\r\n    )\r\n}\r\n\r\nexport default CommentContentPopover;"],"mappings":"mTAAAA,IAAA,OAAOC,MAAW,aAQlB,OAAS,gBAAAC,MAAoB,cAC7B,OAAOC,MAAa,eASZ,mBAAAC,EAIsD,OAAAC,EAD1C,QAAAC,MAHZ,oBAPR,IAAMC,EAA6BJ,EAAQ,IAAM,OAAO,2CAA8B,CAAC,EAEjFK,EAAwB,CAAC,CAAE,aAAAC,CAAa,IAAmC,CAE7E,GAAM,CAAE,cAAAC,EAAe,SAAAC,EAAU,sBAAAC,CAAsB,EAAIC,EAAe,CAAC,CAAE,SAAU,CAAE,cAAAH,EAAe,SAAAC,EAAU,sBAAAC,CAAsB,CAAE,KAAO,CAAE,cAAAF,EAAe,SAAAC,EAAU,sBAAAC,CAAsB,GAAIV,CAAY,EAElN,OACII,EAAAF,EAAA,CACK,UAAAO,EAAS,OACNN,EAAC,OAAI,UAAU,eACX,SAAAC,EAAC,OAAI,UAAU,mDAAmD,MAAO,CAAE,QAAwB,EAC9F,UAAAK,EAAS,IAAKG,GAAuBT,EAACU,EAAA,CAA+B,QAASD,EAAS,KAAMF,EAAsB,KAAMI,GAAoCA,EAAQ,KAAOF,EAAQ,MAAM,EAAG,wBAAyBG,EAAgC,GAA7LH,EAAQ,EAAwL,CAAE,EAC5PT,EAACE,EAAA,CAA2B,aAAcE,EAAc,GAC5D,EACJ,EAEAH,EAAC,OAAI,UAAU,sGACX,UAAAD,EAACa,EAAA,CAAM,IAAKC,cAAmC,EAAIC,EAAO,uBAAyBA,EAAO,uBAAwB,MAAO,IAAK,OAAQ,MAAO,EAC7If,EAAC,KAAE,2LAAmC,GAC1C,EAGJA,EAACgB,EAAA,CAAW,KAAMX,EAAc,GAAK,QAAU,UAAW,GAC9D,CAER,EAEOY,EAAQd","names":["init_esm_shims","Image","shallowEqual","dynamic","Fragment","jsx","jsxs","TouchScreenCommentObserver","CommentContentPopover","setScrollEnd","replyToAuthor","comments","usersCommentsProfiles","useAppSelector","comment","singleComment_default","profile","handleCommentsIdsInLocalStorage","Image","conditions","importImages_default","addComment_default","commentContentPopover_default"]}