import{__spreadArray}from"tslib";var hasShadowDom=function(r){return!!r.shadowRoot&&!!r.attachShadow};var debounceEvent=function(r,e){var n=r._original||r;return{_original:r,emit:debounce(n.emit.bind(n),e)}};var debounce=function(r,e){if(e===void 0){e=0}var n;return function(){var o=[];for(var a=0;a<arguments.length;a++){o[a]=arguments[a]}clearTimeout(n);n=setTimeout.apply(void 0,__spreadArray([r,e],o,false))}};var normalizeColorValue=function(r,e){if(!r)return undefined;var n=r.trim();if(n==="")return undefined;if((e===null||e===void 0?void 0:e.semanticMap)&&e.semanticMap[n]){return e.semanticMap[n]}if(n.startsWith("var("))return n;if(n.startsWith("--"))return"var(".concat(n,")");return n};var setColor=function(r,e){if(!r)return{};var n={primary:"var(--pine-color-text-primary)",secondary:"var(--pine-color-text-secondary)",neutral:"var(--pine-color-text-neutral)",accent:"var(--pine-color-text-accent)",danger:"var(--pine-color-text-danger)",info:"var(--pine-color-text-info)",success:"var(--pine-color-text-success)",warning:"var(--pine-color-text-warning)"};var o=Object.assign(Object.assign({},n),e||{});var a=normalizeColorValue(r,{semanticMap:o});if(!a)return{};return{"--color":a}};export{debounceEvent as d,hasShadowDom as h,normalizeColorValue as n,setColor as s};
//# sourceMappingURL=utils-tJa4KYNO.js.map