text: define(["exports","../../../@polymer/polymer/polymer-element.js","./extensible-toolbar-button.js","../../../@polymer/paper-tooltip/paper-tooltip.js","../../../@polymer/iron-icons/iron-icons.js","./extensible-toolbar-prompt.js","./extensible-toolbar-button-styles.js"],function(_exports,_polymerElement,_extensibleToolbarButton,_paperTooltip,_ironIcons,_extensibleToolbarPrompt,_extensibleToolbarButtonStyles){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.ExtensibleToolbarPromptButton=void 0;class ExtensibleToolbarPromptButton extends _extensibleToolbarButton.ExtensibleToolbarButton{constructor(){super()}static get properties(){return{fields:{type:Array,value:[{property:"",title:"Text",description:"The inner text",inputMethod:"textfield"}]},value:{type:Object,value:{"":null,id:null}},__fields:{type:Array,value:[]},__oldValue:{name:"__oldValue",type:Object,value:null},__prompt:{name:"__prompt",type:Object,value:null}}}static get tag(){return"extensible-toolbar-prompt-button"}ready(){super.ready(),this.__prompt=window.ExtensibleToolbarPrompt.requestAvailability()}_handleButton(e){e.preventDefault(),this.open()}getCleanValue(prop){let val=this.value[prop];return val&&"string"==typeof val&&(val=val.replace(/[\s\n\t]+/g," ").trim()),val}cancel(){this.value=this.__oldValue,this.dispatchEvent(new CustomEvent("cancel",{detail:this})),this.deselect()}confirm(){this.dispatchEvent(new CustomEvent("confirm",{detail:this})),this.deselect()}open(){this.updatePrompt(),this.__prompt.setTarget(this),this.dispatchEvent(new CustomEvent("open-prompt",{detail:this}))}updatePrompt(fields){this.__oldValue=this.value,this.set("__fields",fields)}}_exports.ExtensibleToolbarPromptButton=ExtensibleToolbarPromptButton,window.customElements.define(ExtensibleToolbarPromptButton.tag,ExtensibleToolbarPromptButton)});