import { defineComponent, PropType, } from 'vue'; import { OnUpdateBlockCb, IBlockDefinition, IBlockData, SbMode, SbMain, } from '@schlechtenburg/core'; export interface ISchlechtenburgProps { availableBlocks: IBlockDefinition[]; block: IBlockData; onUpdate: OnUpdateBlockCb; mode: SbMode; } export const Schlechtenburg = defineComponent({ name: 'schlechtenburg', props: { availableBlocks: { type: Array as PropType[]>, default: () => [], }, block: { type: Object as PropType>, required: true, }, /** * Called when the block should be updated. */ onUpdate: { type: (null as unknown) as PropType, default: () => {}, }, mode: { type: String as PropType, validator(value: any) { return Object.values(SbMode).includes(value); }, default: SbMode.Edit, }, }, setup(props: ISchlechtenburgProps) { return () => ; }, });