import type { CloudConstant } from './schema'

export const constantAppOptions: { label: string, value: string }[] = []

export function filterConstantsByApp(constants: CloudConstant[], appId: string): CloudConstant[] {
  if (!appId || appId === 'all')
    return constants
  return constants.filter(c => String(c.app_id) === appId)
}
