/*!
 * KoliBri - The accessible HTML-Standard
 */
import { __rest } from "tslib";
import { h } from "@stencil/core";
import clsx from "../../../utils/clsx";
const NativeOptionFc = (_a) => {
    var { baseClassName = 'kol-select', class: classNames, index, selectedValue, selected, value, label, disabled } = _a, other = __rest(_a, ["baseClassName", "class", "index", "selectedValue", "selected", "value", "label", "disabled"]);
    if (selectedValue === undefined) {
        selectedValue = [];
    }
    else if (!Array.isArray(selectedValue)) {
        selectedValue = [selectedValue];
    }
    const isSelected = selected || selectedValue.includes(value);
    return (h("option", Object.assign({ class: clsx(`${baseClassName}__option`, {
            [`${baseClassName}__option--selected`]: isSelected,
            [`${baseClassName}__option--disabled`]: disabled,
        }, classNames), selected: isSelected, disabled: disabled, value: index }, other), label));
};
export default NativeOptionFc;
//# sourceMappingURL=NativeOption.js.map
