import{S as h}from"./Str.js?ver=1.3.25";import{A as f}from"./Arr.js?ver=1.3.25";import{c as o,w as n,n as l,E as m,r as d,o as c,m as g}from"./vue.esm-bundler.js?ver=1.3.25";import{_ as S}from"./_plugin-vue_export-helper.js?ver=1.3.25";const a=s=>"fcart-"+h.snake(f.get(window,"fluentCartAdminApp.app_config.version","1.0.0"))+"_"+s;class k{static get(e,t=""){let r=localStorage.getItem(a(e));if(r&&["{","["].indexOf(r[0])!==-1)try{r=JSON.parse(r)}catch{return t}else{if(r==="true")return!0;if(r==="false")return!1}return r||t}static set(e,t){typeof t=="object"&&(t=JSON.stringify(t)),localStorage.setItem(a(e),t)}static remove(e){localStorage.removeItem(a(e))}static clear(){localStorage.clear()}static serverMaxUploadSize(){return f.get(window,"fluentCartAdminApp.max_upload_size")||""}static readableFileSizeFromBytes(e){if(e==0)return"0 B";if(!e)return"";const t=Math.floor(Math.log(e)/Math.log(1024)),r=["B","KB","MB","GB","TB"];return(e/Math.pow(1024,t)).toFixed(2)+" "+r[t]}}const B={name:"IconButton",props:{title:{type:String},href:{type:String},target:{type:String},border:{type:String},router_link:{type:Boolean},to:{type:Object},size:{type:String},tag:{type:String},circle:{type:Boolean},bg:{type:String},hover:{type:String}},computed:{isBorder(){return this.border?"border-"+this.border:""},isSize(){return this.size?this.size:""},isTag(){return this.tag?this.tag:"div"},isCircle(){return this.circle?"is-circle":""},isBg(){return this.bg?this.bg:""},isHover(){return this.hover?"hover-"+this.hover:""}}};function y(s,e,t,r,_,i){const u=d("router-link");return t.to?(c(),o(u,{key:0,to:t.to,class:l(["icon-button",[i.isBorder,i.isSize,i.isCircle,i.isBg,i.isHover]]),title:t.title,target:t.target},{default:n(()=>[g(s.$slots,"default")]),_:3},8,["to","class","title","target"])):(c(),o(m(i.isTag),{key:1,class:l(["icon-button",[i.isBorder,i.isSize,i.isCircle,i.isBg,i.isHover]]),href:t.href,title:t.title,target:t.target},{default:n(()=>[g(s.$slots,"default")]),_:3},8,["class","href","title","target"]))}const z=S(B,[["render",y]]);export{z as I,k as S};
