/*!
 * KoliBri - The accessible HTML-Standard
 */
import{o,p as t,w as e}from"./prop.validators-9feb1d92.js";import{i,a as n,b as l}from"./common-54bf85ba.js";const c=(t,o,e)=>{l(e)?t[o]=e:i(e,1)&&(t[o]={icon:e})},f=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},s=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",f(o))}},a=t=>"object"==typeof t&&null!==t&&(void 0===t.style||n(t.style))&&(void 0===t.label||i(t.label))&&i(t.icon,1),d=(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)||a(t.left)||i(t.right,1)||a(t.right)||i(t.top,1)||a(t.top)||i(t.bottom,1)||a(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,a;"function"==typeof(null===(l=c.hooks)||void 0===l?void 0:l.beforePatch)&&(null===(a=c.hooks)||void 0===a||a.beforePatch(t,o,e,i)),s(e)}}}))}))};export{a as i,d as v};