import{DOMSinks as t}from"./index.mjs";const e=(t,e)=>s=>{t.setAttribute(e,s)},s=(t,e)=>{console.log("TODO")},n=n=>i=>{(Object.entries(i)??[]).forEach((([i,o])=>0==o||void 0===o?n.removeAttribute(i):"on"==i.substring(0,2)&&"function"==typeof(o.next??o)?n.addEventListener(i.substring(2),o.next?.bind(o)??o,{capture:!0}):"function"==typeof o.subscribe?o.subscribe((t.get(i)||e)(n,i)):"function"==typeof o.then?o.then((t.get(i)||e)(n,i)):"class"==i?o.then?o.then((t=>s())):o.subscribe?o.subscribe((t=>s())):s():"style"==i?((t,e)=>{const s=t.style;Object.entries(e).forEach((([t,e])=>s[t]=e))})(n,o):"value"==i?n.value=o:n.setAttribute(i,o)))};export{e as attributeSink,n as attributesSink};
//# sourceMappingURL=attribute-sink.mjs.map
