{"version":3,"sources":["../ui/src/components/player-components/liveStatus/liveStatus.tsx"],"sourcesContent":["import { conditions } from \"helpers\";\r\nimport { ConditionName, ILiveStatusProps, zIndex } from \"interfaces\";\r\nimport { handleIsLive } from \"redux-share/actions/controller.actions\";\r\nimport LiveIcon from \"./onlineViewer/liveIcon\";\r\nimport { useAppSelector } from \"redux-share\";\r\nimport { shallowEqual } from 'react-redux';\r\nimport dynamic from \"next/dynamic\";\r\n\r\nconst OnlineViewer = dynamic(() => import(\"./onlineViewer/onlineViewer\"));\r\n\r\nconst LiveStatus = ({ className }: ILiveStatusProps) => {\r\n\r\n    useAppSelector(({ videoData: { isComplexPortrait, isComplexDesktop, onlineViewers, details } }) => ({ isComplexPortrait, isComplexDesktop, onlineViewers, details }), shallowEqual);\r\n    useAppSelector(({ controller: { isLive } }) => ({ isLive }), shallowEqual);\r\n\r\n    return (\r\n        <div \r\n            style={{ zIndex: conditions(ConditionName.isComplexPortrait) ? 0 : zIndex.liveStatus }}\r\n            className={`pl-flex pl-max-w-max pl-gap-1 pl-items-center pl-rounded pl-p-1.5 ${!conditions(ConditionName.isComplexPortrait) && \"pl-relative\"} ${conditions(ConditionName.isLive) ? \"pl-bg-red-zProgress pl-cursor-default\" : \"pl-bg-z-gray-500 pl-cursor-pointer\"} ${className}`}\r\n            onClick={() => !conditions(ConditionName.isLive) && handleIsLive()}\r\n        >\r\n            <div className={`pl-flex pl-items-center pl-gap-2`}>\r\n                <LiveIcon isLive={conditions(ConditionName.isLive)}/>\r\n                <p className=\"pl-text-white pl-text-[12px] pl-font-medium\">زنده</p>\r\n            </div>\r\n            {conditions(ConditionName.showOnlineViewers) && conditions(ConditionName.thresholdOnlineViewers) &&\r\n                <>\r\n                    <div className=\"pl-w-[1px] pl-h-[14px] pl-bg-white\"></div>\r\n                    <OnlineViewer />\r\n                </>\r\n            }\r\n        </div>\r\n    )\r\n}\r\n\r\nexport default LiveStatus;"],"mappings":"4KAAAA,IAKA,OAAS,gBAAAC,MAAoB,cAC7B,OAAOC,MAAa,eAeR,OAKI,YAAAC,EAJA,OAAAC,EADJ,QAAAC,MAAA,oBAbZ,IAAMC,EAAeJ,EAAQ,IAAM,OAAO,6BAA6B,CAAC,EAElEK,EAAa,CAAC,CAAE,UAAAC,CAAU,KAE5BC,EAAe,CAAC,CAAE,UAAW,CAAE,kBAAAC,EAAmB,iBAAAC,EAAkB,cAAAC,EAAe,QAAAC,CAAQ,CAAE,KAAO,CAAE,kBAAAH,EAAmB,iBAAAC,EAAkB,cAAAC,EAAe,QAAAC,CAAQ,GAAIZ,CAAY,EAClLQ,EAAe,CAAC,CAAE,WAAY,CAAE,OAAAK,CAAO,CAAE,KAAO,CAAE,OAAAA,CAAO,GAAIb,CAAY,EAGrEI,EAAC,OACG,MAAO,CAAE,OAAQU,qBAA0C,EAAI,IAAsB,EACrF,UAAW,qEAAqE,CAACA,qBAA0C,GAAK,aAAa,IAAIA,UAA+B,EAAI,wCAA0C,oCAAoC,IAAIP,CAAS,GAC/Q,QAAS,IAAM,CAACO,UAA+B,GAAKC,EAAa,EAEjE,UAAAX,EAAC,OAAI,UAAW,mCACZ,UAAAD,EAACa,EAAA,CAAS,OAAQF,UAA+B,EAAE,EACnDX,EAAC,KAAE,UAAU,8CAA8C,oCAAI,GACnE,EACCW,qBAA0C,GAAKA,0BAA+C,GAC3FV,EAAAF,EAAA,CACI,UAAAC,EAAC,OAAI,UAAU,qCAAqC,EACpDA,EAACE,EAAA,EAAa,GAClB,GAER,GAIDY,EAAQX","names":["init_esm_shims","shallowEqual","dynamic","Fragment","jsx","jsxs","OnlineViewer","LiveStatus","className","useAppSelector","isComplexPortrait","isComplexDesktop","onlineViewers","details","isLive","conditions","handleIsLive","liveIcon_default","liveStatus_default"]}