/**
 * 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.core.js";import"./kendo.icons.js";var __meta__={id:"avatar",name:"Avatar",category:"web",description:"The Avatar component represents an icon, text, or image rendered in a styled container.",depends:["core"]};!function(t,e){var n=window.kendo,r=n.ui.Widget,i=".k-icon,.k-svg-icon",s="k-avatar",a="k-avatar-bordered",o="icon",p="image",l="text",d=r.extend({init:function(t,e){e=e||{},r.fn.init.call(this,t,e),this._fromMarkup(),this._wrapper(),this._markupContent&&this._markupContent.length>0?this._contentFromMarkup():this._content()},options:{name:"Avatar",alt:null,border:!1,className:null,fillMode:"solid",icon:null,image:null,rounded:"full",size:"medium",style:null,text:null,themeColor:"primary",type:l},events:[],setOptions:function(e){var n=this.options,i=this.wrapper,s=t.extend({},n,e);r.fn.setOptions.call(this,e),s[s.type]||(n=this._optionsFromWrapper(n)),!1===s.border&&i.removeClass(a),i.empty(),this.options=n,this._wrapper(),this._content()},_content:function(){var e,r=this.wrapper.find("> span"),i=this.options,s=i.type;s===o?e=t(n.html.renderIcon({icon:i.icon})):s===p?(e=t("<img src='"+i.image+"'>"),i.alt&&e.attr("alt",i.alt)):s===l&&(e=t("<span>"+i.text+"</span>")),r.append(e)},_contentFromMarkup:function(){this.wrapper.find("> span").first().append(this._markupContent)},_fromMarkup:function(){var t,e,n=this.element,r=this.options;n.children().slice(1).remove(),t=n.children("img"),e=n.children(i),t.length>0?(r.type=p,this._markupContent=t.first()):e.length>0?(r.type=o,this._markupContent=e.first()):n.children().length>0&&(r.type=l,this._markupContent=n.children())},_optionsFromWrapper:function(t){var e,n=this.wrapper;return t.type===l?t.text=n.text().trim():t.type===o?n.find(i).attr("class").split(/\s+/).forEach((function(e){0===e.indexOf("k-i-")?t.icon=e.substring(4):0===e.indexOf("k-svg-i-")&&(t.icon=e.replace(/^k-svg-i-/,""))})):t.type===p&&(e=n.find("img"),t.image=e.attr("src"),e.attr("alt")&&(t.alt=e.attr("alt"))),t},_wrapper:function(){var e=this.element,n=this.options,r=t("<span>");this.wrapper=e,e.addClass(s),this._applyCssClasses(),n.border&&e.addClass(a),n.style&&e.css(n.style),n.className&&e.addClass(n.className),r.addClass(s+"-"+n.type),e.prepend(r)}});n.cssProperties.registerPrefix("Avatar","k-avatar-"),n.cssProperties.registerValues("Avatar",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}]),n.ui.plugin(d)}(window.kendo.jQuery);var kendo$1=kendo;export{kendo$1 as default};
//# sourceMappingURL=kendo.avatar.js.map
