import { T, TLBaseShape } from 'tldraw'

// --- Puffer ---
export type PufferShapeProps = {
  w: number
  h: number
  label: string
}

export type PufferShape = TLBaseShape<'puffer', PufferShapeProps>

export const pufferShapeProps = {
  w: T.number,
  h: T.number,
  label: T.string,
}

// --- Kreisel ---
export type KreiselShapeProps = {
  abstand: number
  radius: number
  label: string
}

export type KreiselShape = TLBaseShape<'kreisel', KreiselShapeProps>

export const kreiselShapeProps = {
  abstand: T.number,
  radius: T.number,
  label: T.string,
}

// --- tldraw Type-Augmentation: Custom Shapes registrieren ---
declare module '@tldraw/tlschema' {
  interface TLGlobalShapePropsMap {
    puffer: PufferShapeProps
    kreisel: KreiselShapeProps
  }
}
