/*!
Copyright (c) 2026 Lenovo SSG BASD. All rights reserved.
@license Proprietary

This software is the confidential and proprietary property of Lenovo SSG BASD.
You shall not disclose such Confidential Information and shall use it only in
accordance with the terms of the license agreement.

--- Build Info ---
Version: 1.1.1
Build Time: 2026/2/26 17:21:00
Build Commit: 81e556ed827e2f043668506dae6fae8dbb9ef395
*/
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../_virtual/_rollupPluginBabelHelpers.js"),e=require("../../utils/util.js"),i=require("../../plugin/plugin.js"),o=require("../../stateClassMap.js");var l=function(i){t.inherits(n,i);var l=t.createSuper(n);function n(){return t.classCallCheck(this,n),l.apply(this,arguments)}return t.createClass(n,[{key:"afterCreate",value:function(){var t=this;this.intervalId=0,this.customConfig=null,this.bind(".highlight",["click","touchend"],function(e){(t.config.onClick||t.customOnClick)&&(e.preventDefault(),e.stopPropagation(),t.customOnClick?t.customOnClick(e):t.config.onClick(e))}),this.player.showPrompt=function(){t.showPrompt.apply(t,arguments)},this.player.hidePrompt=function(){t.hide()}}},{key:"setStyle",value:function(t){var e=this;Object.keys(t).map(function(i){e.root.style[i]=t[i]})}},{key:"showPrompt",value:function(t){var i=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(t){this.customOnClick=l;var n=this.config.interval;if(this.intervalId&&(clearTimeout(this.intervalId),this.intervalId=null),e.default.addClass(this.root,"show"),"arrow"===o.mode&&e.default.addClass(this.root,"arrow"),this.find(".xgplayer-prompt-detail").innerHTML="string"==typeof t?t:"".concat(t.text||"")+"".concat(t.highlight?'<i class="highlight">'.concat(t.highlight,"</i>"):""),o.style&&this.setStyle(o.style),"boolean"==typeof o.autoHide?o.autoHide:this.config.autoHide){var r=o.interval||n;this.intervalId=setTimeout(function(){i.hide()},r)}}}},{key:"hide",value:function(){e.default.removeClass(this.root,"show"),e.default.removeClass(this.root,"arrow"),this.root.removeAttribute("style"),this.customOnClick=null}},{key:"render",value:function(){return'<xg-prompt class="xgplayer-prompt '.concat(o.default.CONTROLS_FOLLOW,'">\n    <span class="xgplayer-prompt-detail"></span>\n    </xg-prompt>')}}],[{key:"pluginName",get:function(){return"prompt"}},{key:"defaultConfig",get:function(){return{interval:3e3,style:{},mode:"arrow",autoHide:!0,detail:{text:"",highlight:""},onClick:function(){}}}}]),n}(i.default);exports.default=l;