/**
 * 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";var __meta__={id:"html.icon",name:"Html.Icon",category:"web",description:"HTML font icon rendering utility for Kendo UI for jQuery.",depends:["html.base"]};!function(e,s){var n=window.kendo,i=e.extend,t=n.html.HTMLBase,o="k-i-",a="k-svg-i-",r="k-flip-",l=`${r}h`,c=`${r}v`,p={svg:(e,s)=>new u(e,s),font:(e,s)=>new f(e,s)},d={default:"",horizontal:l,vertical:c,both:`${l} ${c}`},m=t.extend({init:function(e,s){t.fn.init.call(this,e,s),this._wrapper()},options:{name:"HTMLIcon",size:"none",themeColor:"none",flip:"default",iconClass:"",stylingOptions:["size","themeColor","fill"]},_wrapper:function(){this._addClasses()},_addClasses:function(){var e=this,s=e.options,i=s.stylingOptions,t=e.wrapper.data("added-classes");i=i.map((function(e){return"themeColor"===e?n.cssProperties.getValidClass({widget:s.name,propName:e,value:s[e],prefix:"k-color-"}):"fill"===e?d[s.flip]:n.cssProperties.getValidClass({widget:s.name,propName:e,value:s[e],fill:s.fillMode})})),t&&e.wrapper.removeClass(t.filter((s=>s!==e._className)).join(" ")),e.wrapper.data("added-classes",i.concat([e._className])),e.wrapper.addClass(i.join(" "))}}),f=m.extend({init:function(e,s){m.fn.init.call(this,e,s)},options:i({},m.fn.options,{name:"HTMLFontIcon",icon:null}),_wrapper:function(){var e=this,s=e.element[0].className.split(" ").find((e=>e.includes(o))),n=e.options.icon?`${e.options.icon.startsWith(o)?"":o}${e.options.icon}`:"";e._className=n,e.wrapper=e.element.addClass("k-icon k-font-icon").removeClass(s).addClass(n).addClass(e.options.iconClass||""),m.fn._wrapper.call(this)}}),u=m.extend({init:function(e,s){e.empty(),m.fn.init.call(this,e,s)},options:i({},m.fn.options,{name:"HTMLSVGIcon",icon:null}),_wrapper:function(){var s,i=this,t=i.options.icon,o=i.options.iconClass,r=i.element[0].className.split(" ").find((e=>e.includes(a))),l=e("<svg></svg>");if(!t&&o){const e=/k-i-(\w+(?:-\w+)*)/;let s=o.match(e);s&&(t=s[1],o=o.replace(s[0],""))}n.isString(t)&&(t=t.replace("k-i-","").replace(/-./g,(e=>e[1].toUpperCase())),t=n.ui.svgIcons[t]||n.ui.svgIcons[`${t}Icon`]),s=t&&t.name?`${a}${t.name}`:"",i._className=s,i.wrapper=i.element.addClass("k-icon k-svg-icon").removeClass(r).addClass(s).addClass(o||"").attr("aria-hidden",!0),e.isPlainObject(t)&&(l.attr("viewBox",t.viewBox||"").attr({viewBox:t.viewBox||"",focusable:"false",xmlns:"http://www.w3.org/2000/svg"}).html(t.content||""),i.wrapper.append(l[0].outerHTML)),m.fn._wrapper.call(this)}});e.extend(n.html,{renderIcon:function(s,i){return(!s||e.isPlainObject(s)||n.isString(s))&&(i=s,s=e("<span></span>")),n.isString(i)&&(i={icon:i}),n.isPresent(i.type)||(i.type=n.defaults.iconType?n.defaults.iconType:"svg"),n.isFunction(i.type)?i.type(s,i):n.isFunction(p[i.type])?p[i.type](s,i).html():null},HTMLFontIcon:f,HTMLSvgIcon:u,getIconRenderer:e=>p[e]}),n.cssProperties.registerPrefix("HTMLFontIcon","k-icon-"),n.cssProperties.registerValues("HTMLFontIcon",[{prop:"size",values:n.cssProperties.sizeValues.concat([["xsmall","xs"],["xlarge","xl"],["xxlarge","xxl"],["xxxlarge","xxxl"]])},{prop:"themeColor",values:["primary","secondary","tertiary","inherit","info","success","warning","error","dark","light","inverse"]}]),n.cssProperties.registerPrefix("HTMLSVGIcon","k-icon-"),n.cssProperties.registerValues("HTMLSVGIcon",[{prop:"size",values:n.cssProperties.sizeValues.concat([["xsmall","xs"],["xlarge","xl"],["xxlarge","xxl"],["xxxlarge","xxxl"]])},{prop:"themeColor",values:["primary","secondary","tertiary","inherit","info","success","warning","error","dark","light","inverse"]}])}(window.kendo.jQuery);var kendo$1=kendo;export{kendo$1 as default};
//# sourceMappingURL=kendo.html.icon.js.map
