import type { ChatPageContext } from '../../context'
import { h } from 'vue'
import { DimSdkPausedQueueDecisionDialog } from '../../../../ui/components/PausedQueueDecisionDialog'

export function renderPausedQueueDecisionOverlay(ctx: ChatPageContext) {
  return [
    h(DimSdkPausedQueueDecisionDialog, {
      w: ctx.mdW.value,
      h: ctx.mdH.value,
      modelValue: ctx.pausedQueueDecisionVisible.value,
      'onUpdate:modelValue': (v: boolean) =>
        (ctx.pausedQueueDecisionVisible.value = v),
      count: ctx.queueItems.value.length,
      draftSummary: ctx.pausedQueueDecisionSummary.value,
      onContinue: ctx.continuePausedQueueDecision,
      onAppend: ctx.appendPausedQueueDecision,
      onReplace: () => void ctx.replacePausedQueueDecision(),
    }),
  ]
}
