// Generated with util/create-component.js
import React from "react";
import { HorizontalList } from "../HorizontalList";
import { Button } from "../Button";
import { jsx as _jsx } from "react/jsx-runtime";
export const Tabs = props => {
  const {
    items = [],
    value = -1,
    onChange = () => {},
    size = "medium",
    variant = "ghost",
    shape = "square",
    backgroundColor = "primary",
    hoverBackgroundColor = null,
    tabColor = null,
    hoverTabColor = null,
    activeColor = null,
    align = "left",
    children,
    className,
    ...otherProps
  } = props;
  return /*#__PURE__*/_jsx(HorizontalList, { ...otherProps,
    children: items.map((item, index) => /*#__PURE__*/_jsx(Button, {
      startIcon: item.icon,
      label: item.label,
      active: index === value,
      shape: shape,
      size: size,
      variant: variant,
      backgroundColor: index === value ? activeColor ? activeColor : backgroundColor : backgroundColor,
      hoverBackgroundColor: hoverBackgroundColor,
      color: tabColor,
      hoverColor: hoverTabColor,
      align: align,
      onClick: () => onChange(index)
    }, index))
  });
};