var __spreadArray=this&&this.__spreadArray||function(r,e){for(var o=0,n=e.length,t=r.length;o<n;o++,t++)r[t]=e[o];return r};import{b as ApiError}from"./kimlikApi-7350588e.js";var colorMap={turquoise:"#1abc9c",emerald:"#2ecc71",river:"#3498db",amethyst:"#9b59b6",asphalt:"#34495e",sun:"#f1c40f",carrot:"#e67e22",alizarin:"#e74c3c",cloud:"#ecf0f1",concrete:"#95a5a6"};var methodColorMap={info:"#3498db",debug:"#9b59b6",warn:"#e67e22",error:"#e74c3c",log:"#95a5a6"};var methodLevel={debug:0,log:1,info:2,warn:3,error:4};var Logger=function(){function r(e){var o=this;this.level=1;this.new=function(e){var n=new r(e);n.level=o.level;n.color=o.color;return n};this.setColor=function(r){o.color=colorMap[r];return o};this.setLevel=function(r){o.level=methodLevel[r];return o};this.debug=function(){var r=[];for(var e=0;e<arguments.length;e++){r[e]=arguments[e]}return o.print.apply(o,__spreadArray(["debug"],r))};this.debugGroup=function(r){var e=[];for(var n=1;n<arguments.length;n++){e[n-1]=arguments[n]}return o.printGroup.apply(o,__spreadArray(["debug",r],e))};this.log=function(){var r=[];for(var e=0;e<arguments.length;e++){r[e]=arguments[e]}return o.print.apply(o,__spreadArray(["log"],r))};this.logGroup=function(r){var e=[];for(var n=1;n<arguments.length;n++){e[n-1]=arguments[n]}return o.printGroup.apply(o,__spreadArray(["log",r],e))};this.info=function(){var r=[];for(var e=0;e<arguments.length;e++){r[e]=arguments[e]}return o.print.apply(o,__spreadArray(["info"],r))};this.infoGroup=function(r){var e=[];for(var n=1;n<arguments.length;n++){e[n-1]=arguments[n]}return o.printGroup.apply(o,__spreadArray(["info",r],e))};this.warn=function(){var r=[];for(var e=0;e<arguments.length;e++){r[e]=arguments[e]}return o.print.apply(o,__spreadArray(["warn"],r))};this.warnGroup=function(r){var e=[];for(var n=1;n<arguments.length;n++){e[n-1]=arguments[n]}return o.printGroup.apply(o,__spreadArray(["warn",r],e))};this.error=function(){var r=[];for(var e=0;e<arguments.length;e++){r[e]=arguments[e]}return o.print.apply(o,__spreadArray(["error"],r))};this.errorGroup=function(r){var e=[];for(var n=1;n<arguments.length;n++){e[n-1]=arguments[n]}return o.printGroup.apply(o,__spreadArray(["error",r],e))};this.print=function(r){var e=[];for(var n=1;n<arguments.length;n++){e[n-1]=arguments[n]}if(methodLevel[r]<o.level)return;console[r].apply(console,o.getColoredMessage(r,e))};this.printGroup=function(r,e){var n=[];for(var t=2;t<arguments.length;t++){n[t-2]=arguments[t]}if(methodLevel[r]<o.level)return;console.groupCollapsed.apply(console,o.getColoredMessage(r,e));console.log.apply(console,n);console.groupEnd()};this.getColoredMessage=function(r){var e=[];for(var n=1;n<arguments.length;n++){e[n-1]=arguments[n]}return["%c"+r.toUpperCase()+" %c"+o.prefix+" %c"+e.join(" "),"color:"+methodColorMap[r]+"; font-weight: bold;","color:"+o.color+"; font-weight: bold;","color:"+"white"+"; font-weight: normal;"]};this.prefix=e}return r}();function unauthorized(){var r=new ApiError("network");r.status=401;return r}function notFound(){var r=new ApiError("network");r.status=404;return r}function notImplemented(r){if(r===void 0){r=""}var e=new ApiError("network");e.status=501;e.statusText=r;return e}export{Logger as L,notFound as a,notImplemented as n,unauthorized as u};