class IHKLinkCollection {
  constructor(div) {
    const observer = new ResizeObserver((entries) => {
      entries.map((entry) => {
        const w = entry.borderBoxSize[0].inlineSize;
        if (w < 1000) {
          div.dataset.cols = '1';
        } else {
          div.dataset.cols = '2';
        }
      })
    })
    observer.observe(div);
  }
}

export default IHKLinkCollection;