import type { ChatPageContext } from '../../context'
import { renderUpgradeToastOverlay as renderUpgradeToast } from '../../../utils/upgrade-toast'

export function renderUpgradeToastOverlay(ctx: ChatPageContext) {
  return renderUpgradeToast({
    notification: ctx.store.upgradeNotification.value,
    cols: ctx.cols.value,
    ui: ctx.ui,
    onDismiss: () => {
      ctx.store.dismissUpgradeNotification()
      ctx.focusBrowserTextarea()
    },
  })
}
