import { resolve } from "@scalar/workspace-store/resolve";
import { isArraySchema } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
const getEnumValues = (value) => {
  if (!value) {
    return [];
  }
  if (value.enum) {
    return value.enum;
  }
  if (isArraySchema(value) && typeof value.items === "object") {
    const resolvedItems = resolve.schema(value.items);
    if (resolvedItems && "enum" in resolvedItems && resolvedItems.enum) {
      return resolvedItems.enum;
    }
  }
  return [];
};
export {
  getEnumValues
};
