"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");require("../../node_modules/react-redux/es/index.js");var r=require("./Timer.js"),t=require("../../node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js"),i=require("../../node_modules/@fortawesome/react-fontawesome/index.es.js");require("../../node_modules/@babel/runtime/helpers/defineProperty.js"),require("../../node_modules/@babel/runtime/helpers/objectWithoutProperties.js"),require("../../node_modules/@babel/runtime/helpers/typeof.js"),require("../../node_modules/html-parse-stringify/dist/html-parse-stringify.js"),require("../../node_modules/react-i18next/dist/es/context.js");var s=require("../../node_modules/react-i18next/dist/es/useTranslation.js");require("../../node_modules/@babel/runtime/helpers/slicedToArray.js");var n=require("../AvatarGroup.js"),a=require("../../utils/genericFunctions/isEmpty.js"),o=require("../../node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js"),l=require("../../node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs.js"),u=require("../../node_modules/react-redux/es/hooks/useSelector.js"),p=require("../../node_modules/react-redux/es/hooks/useDispatch.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=d(e);exports.default=function(d){var c=d.isVisible,f=u.useSelector((function(e){return e.currentCall})),x=f.number,y=f.displayName,g=f.transferring,v=f.transferringName,j=f.startTime,h=f.transferringStartTime,b=f.transferCalls,q=p.useDispatch(),w=s.useTranslation().t,E=u.useSelector((function(e){return e.island})),_=E.isOpen,N=E.previousView,T=u.useSelector((function(e){return e.screenShare})),S=T.active,C=T.role,A=u.useSelector((function(e){return e.conference})),P=A.isActive,R=A.usersList,k=A.ownerInformations;return e.useEffect((function(){var e=b.find((function(e){return e.number!==x}));e&&q.currentCall.updateCurrentCall({transferringName:e.displayName,transferringStartTime:e.startTime})}),[x]),m.default.createElement(o.AnimatePresence,null,c&&m.default.createElement(l.motion.div,{className:"pi-absolute pi-w-full pi-bg-gray-700 pi-flex pi-justify-between pi-text-gray-50 dark:pi-text-gray-50 -pi-mt-10 -pi-z-10 pi-pointer-events-auto pi-items-start ".concat(_?"pi-px-6":"pi-px-4"," pi-pt-3"),style:{borderTopLeftRadius:"20px",borderTopRightRadius:"20px",height:"60px"},initial:{y:60},animate:{y:0},exit:{y:60,transitionEnd:{display:"none"}},transition:{duration:.12,ease:"easeOut"}},m.default.createElement("div",{className:"pi-font-medium pi-text-sm pi-relative"},m.default.createElement("div",{className:"pi-whitespace-nowrap pi-overflow-hidden ".concat(_&&"video"!==N?"pi-w-44":"pi-w-16")},g?v:P&&!a.isEmpty(k)?w("Conference.In conference"):P&&a.isEmpty(k)?w("Conference.Waiting for the conference"):"recorder"===N?w("Common.Record message"):"player"===N?w("Common.Play message"):y),m.default.createElement("div",{className:"pi-w-6 pi-absolute pi-right-0 pi-top-0 pi-h-full pi-bg-gradient-to-r pi-from-transparent pi-to-gray-700"})),m.default.createElement("div",{className:"pi-flex pi-gap-5"},S&&"publisher"===C&&m.default.createElement("div",{className:"pi-flex pi-gap-2 pi-font-medium pi-items-center pi-rounded-full pi-px-2 pi-py-1 pi-text-xs pi-relative -pi-top-0.5 pi-bg-emerald-700 pi-text-emerald-50"},m.default.createElement(i.FontAwesomeIcon,{icon:t.faDisplay,className:"pi-w-4 pi-h-4"}),w("Screen sharing.Sharing")),m.default.createElement("div",{className:"pi-w-16 pi-flex pi-justify-end"},P||"recorder"===N||"player"===N?m.default.createElement(n.default,{usersList:R||{},maxAvatars:5}):m.default.createElement(r.default,{size:"small",startTime:g?h:j})))))};
//# sourceMappingURL=BackCall.js.map
