"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../Button.js"),r=require("../../node_modules/@fortawesome/react-fontawesome/index.es.js"),s=require("../../node_modules/@nethesis/nethesis-solid-svg-icons/index.mjs.js"),i=require("../../lib/webrtc/messages.js"),o=require("../../store/index.js");require("../../node_modules/react-redux/es/index.js");var n=require("../../static/outgoing_ringtone.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 a=require("../../node_modules/react-i18next/dist/es/useTranslation.js");require("../../node_modules/@babel/runtime/helpers/slicedToArray.js");var l=require("../../utils/customHooks/useEventListener.js"),u=require("../../utils/genericFunctions/eventDispatch.js");require("../../node_modules/tslib/tslib.es6.js");var d=require("../CustomThemedTooltip.js"),c=require("../../node_modules/react-redux/es/hooks/useDispatch.js"),p=require("../../node_modules/react-redux/es/hooks/useSelector.js");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=m(e);exports.TransferActions=function(){var e=c.useDispatch(),m=p.useSelector((function(e){return e.currentCall}));function j(){e.currentCall.updateTransferSwitching(!0),i.sendDTMF("*"),o.store.getState().player.audioPlayerPlaying||e.player.updateStartAudioPlayer({src:n.default,loop:!0}),setTimeout((function(){i.sendDTMF("4"),e.player.stopAudioPlayer(),u.eventDispatch("phone-island-call-transfer-switched",{})}),500)}m.transferCalls,m.number,l.useEventListener("phone-island-call-transfer-switch",(function(){j()}));var h=a.useTranslation().t;return f.default.createElement(f.default.Fragment,null,f.default.createElement("div",{className:"pi-grid pi-grid-cols-3 pi-auto-cols-max pi-gap-y-5 pi-justify-items-center pi-place-items-center pi-justify-center"},f.default.createElement("div",null),f.default.createElement(t.Button,{onClick:j,variant:"default","data-tooltip-id":"transfer-actions-tooltip","data-tooltip-content":h("Tooltip.Switch call")||""},f.default.createElement(r.FontAwesomeIcon,{className:"pi-h-6 pi-w-6",icon:s.faArrowsRepeat})),f.default.createElement("div",null)),f.default.createElement(d.CustomThemedTooltip,{className:"pi-z-1000",id:"transfer-actions-tooltip",place:"bottom"}))};
//# sourceMappingURL=TransferActions.js.map
