/** * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ import type { PropType } from 'vue' import type { IAppDiscoverElement } from '../../constants/AppDiscoverTypes.ts' import { APP_DISCOVER_KNOWN_TYPES } from '../../constants/AppDiscoverTypes.ts' /** * Common Props for all app discover types */ export const commonAppDiscoverProps = { type: { type: String as PropType, required: true, validator: (v: unknown) => typeof v === 'string' && APP_DISCOVER_KNOWN_TYPES.includes(v as never), }, id: { type: String as PropType, required: true, }, date: { type: Number as PropType, required: false, default: undefined, }, expiryDate: { type: Number as PropType, required: false, default: undefined, }, headline: { type: Object as PropType, required: false, default: () => null, }, link: { type: String as PropType, required: false, default: () => null, }, } as const