/**
 * Kendo UI v2023.3.1114 (http://www.telerik.com/kendo-ui)
 * Copyright 2023 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
 *
 * Kendo UI commercial licenses may be obtained at
 * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete
 * If you do not own a commercial license, this file shall be governed by the trial license terms.
 */
import"./kendo.html.base.js";import"./kendo.icons.js";var __meta__={id:"html.button",name:"Html.Button",category:"web",description:"HTML rendering utility for Kendo UI for jQuery.",depends:["html.base","icons"],features:[]};!function(e,t){var n=window.kendo,s=n.html.HTMLBase,i="k-button-icon",o=s.extend({init:function(e,t){var n=this;s.fn.init.call(n,e,t),n.wrapper=n.element.addClass("k-button"),!n.element.attr("type")&&n.options.type&&n.element.attr("type",n.options.type),n._addClasses(),n.iconElement(),n._textElement()},options:{name:"HTMLButton",type:"button",icon:"",iconClass:"",spriteCssClass:"",imageUrl:"",size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base",stylingOptions:["size","rounded","fillMode","themeColor"]},iconElement:function(){var t,s,o,a=this,l=a.element,r=a.options,d=r.icon,c=r.iconClass,p=r.spriteCssClass,u=r.imageUrl;(p||u||d||c)&&(o=!0,l.contents().filter((function(){return!(e(this).hasClass("k-sprite")||e(this).hasClass("k-icon")||e(this).hasClass("k-svg-icon")||e(this).hasClass("k-image"))})).each((function(e,t){(1==t.nodeType||3==t.nodeType&&n.trim(t.nodeValue).length>0)&&(o=!1)}))),o&&a.element.addClass("k-icon-button"),u?((s=l.children("img.k-image").first())[0]||(s=e('<img alt="icon" class="k-image" />').prependTo(l)),s.attr("src",u),s.addClass(i)):d||c?((t=l.children("span.k-icon, span.k-svg-icon").first())[0]?n.ui.icon(t,{icon:d,iconClass:c}):t=e(n.ui.icon({icon:d,iconClass:c})).prependTo(l),t.addClass(i)):p&&((t=l.children("span.k-sprite").first())[0]||(t=e('<span class="k-sprite"></span>').prependTo(l)),t.addClass(p+" "+i))},_textElement:function(){this.element.contents().filter((function(){return!(e(this).hasClass(i)||e(this).hasClass("k-sprite")||e(this).hasClass("k-icon")||e(this).hasClass("k-image"))})).each((function(e,t){if(1==t.nodeType||3==t.nodeType&&n.trim(t.nodeValue).length>0){if(3===t.nodeType){var s=document.createElement("span");t.parentNode.insertBefore(s,t),s.appendChild(t),t=s}t.classList.add("k-button-text")}}))}});e.extend(n.html,{renderButton:function(t,n){return(undefined===arguments[0]||e.isPlainObject(arguments[0]))&&(n=t,t=e("<button></button>")),new o(t,n).html()},HTMLButton:o}),n.cssProperties.registerPrefix("HTMLButton","k-button-"),n.cssProperties.registerValues("HTMLButton",[{prop:"fillMode",values:n.cssProperties.fillModeValues.concat(["link"])},{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}])}(window.kendo.jQuery);var kendo$1=kendo;export{kendo$1 as default};
//# sourceMappingURL=kendo.html.button.js.map
