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