2022-11-17 10:33:17 +01:00
|
|
|
import { z } from 'zod'
|
2023-01-25 11:27:47 +01:00
|
|
|
import { blockBaseSchema } from '../baseSchemas'
|
|
|
|
import { BubbleBlockType } from './enums'
|
2022-11-17 10:33:17 +01:00
|
|
|
|
|
|
|
export const audioBubbleContentSchema = z.object({
|
|
|
|
url: z.string().optional(),
|
|
|
|
})
|
|
|
|
|
2023-03-14 16:42:12 +01:00
|
|
|
export const audioBubbleBlockSchema = blockBaseSchema.merge(
|
2022-11-17 10:33:17 +01:00
|
|
|
z.object({
|
|
|
|
type: z.enum([BubbleBlockType.AUDIO]),
|
|
|
|
content: audioBubbleContentSchema,
|
|
|
|
})
|
|
|
|
)
|
|
|
|
|
|
|
|
export const defaultAudioBubbleContent = {}
|
|
|
|
|
|
|
|
export type AudioBubbleBlock = z.infer<typeof audioBubbleBlockSchema>
|
|
|
|
export type AudioBubbleContent = z.infer<typeof audioBubbleContentSchema>
|