/*!
 * KoliBri - The accessible HTML-Standard
 */
import{o,p as t,w as e}from"./prop.validators-db70e3c4.js";import{i,b as n,c as l}from"./reuse-b66836de.js";const c=(t,o,e)=>{l(e)?t[o]=e:i(e,1)&&(t[o]={icon:e})},s=t=>{let o={};return i(t,1)?o={left:{icon:t}}:"object"==typeof t&&null!==t&&(c(o,"top",t.top),c(o,"right",t.right),c(o,"bottom",t.bottom),c(o,"left",t.left)),o},f=t=>{var o,e,i;if(null===(o=t.nextState)||void 0===o?void 0:o.has("_icons")){const o=null===(e=t.nextState)||void 0===e?void 0:e.get("_icons");null===(i=t.nextState)||void 0===i||i.set("_icons",s(o))}},d=t=>"object"==typeof t&&null!==t&&(void 0===t.style||n(t.style))&&(void 0===t.label||i(t.label))&&i(t.icon,1),r=(l,n,c={})=>{o(n,(()=>{var o;try{n=t(n)}catch(o){}e(l,"_icons",(t=>{const o="object"==typeof t&&null!==t&&0===Object.keys(t).length;return null===t||o||i(t,1)||"object"==typeof t&&null!==t&&(i(t.left,1)||d(t.left)||i(t.right,1)||d(t.right)||i(t.top,1)||d(t.top)||i(t.bottom,1)||d(t.bottom))}),new Set(["KoliBriIcon"]),n,Object.assign(Object.assign({},c),{defaultValue:{},hooks:{afterPatch:null===(o=c.hooks)||void 0===o?void 0:o.afterPatch,beforePatch:(t,o,e,i)=>{var l,n;"function"==typeof(null===(l=c.hooks)||void 0===l?void 0:l.beforePatch)&&(null===(n=c.hooks)||void 0===n||n.beforePatch(t,o,e,i)),f(e)}}}))}))};export{d as i,r as v};