{"version":3,"sources":["../ui/src/components/player-components/fullScreen/fullScreen.tsx","../ui/src/components/player-components/fullScreen/fullScreenIcon.tsx"],"sourcesContent":["import { useEffect, useState } from \"react\";\r\nimport FullScreenIcon from \"./fullScreenIcon\";\r\nimport { conditions } from \"helpers\";\r\nimport { ConditionName } from \"interfaces\";\r\nimport { useAppDispatch, useAppSelector } from \"redux-share/hooks\";\r\nimport { setActiveElements } from \"redux-share/slices/controllerSlice\";\r\nimport { handleFullScreen, handleLockOrientation } from \"redux-share/actions/controller.actions\";\r\nimport { shallowEqual } from 'react-redux';\r\nimport dynamic from \"next/dynamic\";\r\n\r\nconst ControllbarTooltip = dynamic(() => import(\"../../mainComponent/footer/controllbar/controllbarTooltip\"));\r\n\r\nconst FullScreen = () => {\r\n\r\n    const { isFullScreen } = useAppSelector(({ controller: { firstPlay, isFullScreen } }) => ({ firstPlay, isFullScreen }), shallowEqual);\r\n\r\n    const [showTooltip, setShowTooltip] = useState<boolean>(false);\r\n\r\n    const dispatch = useAppDispatch();\r\n\r\n    useEffect(() => {\r\n        if (!conditions(ConditionName.isFirstPlay)) dispatch(setActiveElements(false));\r\n    }, [isFullScreen])\r\n\r\n    return (\r\n        <div className=\"pl-relative pl-flex pl-items-center\">\r\n            <FullScreenIcon \r\n                onMouseOver={() => !conditions(ConditionName.isTouchScreen) && setShowTooltip(true)}\r\n                onMouseLeave={() => !conditions(ConditionName.isTouchScreen) && setShowTooltip(false)}\r\n                onClick={() => {\r\n                    handleFullScreen();\r\n                    handleLockOrientation();\r\n                }}\r\n            />\r\n            {showTooltip && <ControllbarTooltip title={`${conditions(ConditionName.isFullScreen) ? \"خروج از\" : \"\"} تمام صفحه (f)`} className=\"!pl-right-[-10px]\"/>}\r\n        </div>\r\n    )\r\n}\r\n\r\nexport default FullScreen;","import Image from \"next/image\";\r\nimport { conditions } from \"../../../../../helpers\";\r\nimport { ConditionName, IFullScreenIconProps } from \"../../../../../interfaces\";\r\nimport IMAGES from \"../../../../../images/importImages\";\r\nimport { useAppSelector } from \"redux-share\";\r\nimport { shallowEqual } from 'react-redux'\r\n\r\nconst FullScreenIcon = (props: IFullScreenIconProps) => {\r\n\r\n    useAppSelector(({ videoData: { isComplexPortrait, videoElementSizeInfo, params } }) => ({ isComplexPortrait, videoElementSizeInfo, params }), shallowEqual);\r\n    useAppSelector(({ controller: { isFullScreen, showMiniPlayer } }) => ({ isFullScreen, showMiniPlayer }), shallowEqual);\r\n\r\n    return (\r\n        <div className={`pl-flex pl-items-center ${conditions(ConditionName.isComplexPortrait) && \"pl-flex pl-items-end pl-w-[35px] pl-h-[35px]\"}`} onClick={props.onClick}>\r\n            {conditions(ConditionName.isSplusEnvironment) ? (\r\n                <i \r\n                    className={`fa-solid ${conditions(ConditionName.isFullScreen) ? \"fa-compress\" : \"fa-expand\"} pl-text-white pl-cursor-pointer ${conditions(ConditionName.isMiniPlayer) ? \"pl-text-[13px]\" : \"pl-text-[22px]\"}`} \r\n                    onMouseOver={props.onMouseOver}\r\n                    onMouseLeave={props.onMouseLeave}\r\n                />\r\n            ) : (\r\n                <Image\r\n                    src={conditions(ConditionName.isFullScreen) ? IMAGES.nonFullScreen : IMAGES.fullScreen}\r\n                    alt=\"fullScreen-icon\"\r\n                    className={`pl-cursor-pointer`}\r\n                    width={conditions(ConditionName.isMiniPlayer) ? 13 : conditions(ConditionName.isComplexPortrait) ? 17 : 22}\r\n                    height={conditions(ConditionName.isMiniPlayer) ? 14 : conditions(ConditionName.isComplexPortrait) ? 17 : 22}\r\n                    onMouseOver={props.onMouseOver}\r\n                    onMouseLeave={props.onMouseLeave}\r\n                />\r\n            )}\r\n        </div>\r\n    )\r\n}\r\n\r\nexport default FullScreenIcon;"],"mappings":"+NAAAA,IAAA,OAAS,aAAAC,EAAW,YAAAC,MAAgB,QCApCC,IAAA,OAAOC,MAAW,aAKlB,OAAS,gBAAAC,MAAoB,cAUb,cAAAC,MAAA,oBARhB,IAAMC,EAAkBC,IAEpBC,EAAe,CAAC,CAAE,UA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,EAAG,CAACV,CAAY,CAAC,EAGbH,EAAC,OAAI,UAAU,sCACX,UAAAD,EAACe,EAAA,CACG,YAAa,IAAM,CAACF,iBAAsC,GAAKL,EAAe,EAAI,EAClF,aAAc,IAAM,CAACK,iBAAsC,GAAKL,EAAe,EAAK,EACpF,QAAS,IAAM,CACXQ,EAAiB,EACjBC,EAAsB,CAC1B,EACJ,EACCV,GAAeP,EAACE,EAAA,CAAmB,MAAO,GAAGW,gBAAqC,EAAI,wCAAY,EAAE,yDAAkB,UAAU,oBAAmB,GACxJ,CAER,EAEOK,EAAQf","names":["init_esm_shims","useEffect","useState","init_esm_shims","Image","shallowEqual","jsx","FullScreenIcon","props","useAppSelector","isComplexPortrait","videoElementSizeInfo","params","isFullScreen","showMiniPlayer","conditions","Image","importImages_default","fullScreenIcon_default","shallowEqual","dynamic","jsx","jsxs","ControllbarTooltip","FullScreen","isFullScreen","useAppSelector","firstPlay","showTooltip","setShowTooltip","useState","dispatch","useAppDispatch","useEffect","conditions","setActiveElements","fullScreenIcon_default","handleFullScreen","handleLockOrientation","fullScreen_default"]}