import { Select } from "antd"; import { InputComponentProps } from "../BaseWebPlugin"; import { useInstances } from "../model/instance"; interface BaseInputInstanceProps extends InputComponentProps { includeAll?: boolean; } function BaseInputInstance(props: BaseInputInstanceProps) { const [instances, synced] = useInstances(); const options = [ ...(props.includeAll ? [{ label: "All instances", value: null }] : []), ...[...instances.values()].map(instance => ({ label: instance.name ?? `Instance ${instance.id}`, value: instance.id, })), ]; return (