import { Alert } from "@scandic-hotels/design-system/Alert"

import type { AlertBlock } from "@scandic-hotels/trpc/types/blocks"

interface AlertBlockProps extends Pick<AlertBlock, "alert"> {}

export function AlertBlock({ alert }: AlertBlockProps) {
  if (!alert) {
    return null
  }

  return <Alert {...alert} />
}
