import { z } from 'zod'
import { pikkuSessionlessFunc } from '#pikku'

export const NotifyCardCreatedInput = z.object({
  cardId: z.string(),
  title: z.string(),
  priority: z.enum(['low', 'medium', 'high']),
  labels: z.array(z.string()),
})

export const notifyCardCreated = pikkuSessionlessFunc({
  inline: false,
  input: NotifyCardCreatedInput,
  func: async ({ logger }, { cardId, title, priority }) => {
    logger.info(`notify ${priority} card=${cardId} '${title}'`)
  },
})
