import { defineComponent, h } from "vue";
import { cx } from "../utils.js";

export default defineComponent({
	name: "GnProgressStages",
	props: {
		items: { type: Array, default: () => [] }
	},
	setup(props, { attrs }) {
		return () => h("div", { ...attrs, class: cx("progress-stages", attrs.class) }, props.items.map(item => h("div", {
			class: cx("progress-stage", {
				"progress-stage-complete": item.status === "complete",
				"progress-stage-current": item.status === "current"
			})
		}, item.label || item)));
	}
});
