import './slider-tabs.scss';
import {createElement} from "../../_global/scripts/helpers";

export const createSliderTabs = ({
   count = 3
}) => {
  const myControls = createElement('div', ['controls'], null);
  const ul = createElement('ul', ['slider-tabs'], null, myControls);
  for (let i = 0; i < count; i++) {
    const li = createElement('li', [], null, ul);
    const btn = createElement('button', ['btn'], null, li);
    createElement('span', [], String(i + 1), btn);
    if (i === 0) btn.classList.add('active');
  }
  return myControls;
}