"use strict";const u=require("react"),i=require("../components/utils.cjs");function l(e){return u.useMemo(()=>{if(!i.canUseDOM())return{isValid:!0,svgAttributes:{},innerSvgContent:e};const n=i.sanitizeSvg(e,{allowStyles:!1,forbiddenAttributes:[],forbiddenTags:[]});if(!n)return console.warn("InlineSvg: Failed to sanitize SVG data"),{isValid:!1,svgAttributes:{},innerSvgContent:""};const t=new DOMParser().parseFromString(n,"image/svg+xml").querySelector("svg");if(!t)return console.warn("InlineSvg: No SVG element found in markup"),{isValid:!1,svgAttributes:{},innerSvgContent:""};const r={};for(const s of Array.from(t.attributes)){const o=s.name.replace(/-([a-z])/g,(S,a)=>a.toUpperCase());r[o]=s.value}return{isValid:!0,svgAttributes:r,innerSvgContent:t.innerHTML}},[e])}exports.useInlineSvg=l;
//# sourceMappingURL=use-inline-svg-C2ko8Bcq.cjs.js.map
