{"version":3,"file":"index.cjs","names":["component","jsxComponent","raw","jsxComponent","raw","jsxComponent","raw","jsxComponent","raw","jsxComponent","raw","jsxComponent","z","z","z","z","makeOption","getConditionalContent","z","z","z","z","Transformer","validation","not","and","Self","Condition"],"sources":["../../forge-govuk-components/src/utils/nunjucksComponent.ts","../../forge-govuk-components/src/utils/govukParamNormalisers.ts","../../forge-govuk-components/src/components/accordion/govukAccordion.ts","../../forge-govuk-components/src/components/back-link/govukBackLink.ts","../../forge-govuk-components/src/components/body/govukBody.tsx","../../forge-govuk-components/src/components/breadcrumbs/govukBreadcrumbs.ts","../../forge-govuk-components/src/components/button/govukButton.ts","../../forge-govuk-components/src/components/button-group/govukButtonGroup.tsx","../../forge-govuk-components/src/components/grid-row/govukGridRow.tsx","../../forge-govuk-components/src/components/heading/govukHeading.tsx","../../forge-govuk-components/src/components/list/govukList.tsx","../../forge-govuk-components/src/components/section-break/govukSectionBreak.tsx","../../forge-govuk-components/src/components/text-input/govukTextInput.ts","../../forge-govuk-components/src/components/password-input/govukPasswordInput.ts","../../forge-govuk-components/src/components/select-input/govukSelectInput.ts","../../forge-govuk-components/src/components/radio-input/govukRadioInput.ts","../../forge-govuk-components/src/components/checkbox-input/govukCheckboxInput.ts","../../forge-govuk-components/src/components/textarea-input/govukTextareaInput.ts","../../forge-govuk-components/src/components/character-count/govukCharacterCount.ts","../../forge-govuk-components/src/components/date-input/govukDateInputVariants.ts","../../forge-govuk-components/src/components/details/govukDetails.ts","../../forge-govuk-components/src/components/exit-this-page/govukExitThisPage.ts","../../forge-govuk-components/src/components/inset-text/govukInsetText.ts","../../forge-govuk-components/src/components/notification-banner/govukNotificationBanner.ts","../../forge-govuk-components/src/components/pagination/govukPagination.ts","../../forge-govuk-components/src/components/panel/govukPanel.ts","../../forge-govuk-components/src/components/summary-list/govukSummaryList.ts","../../forge-govuk-components/src/components/table/govukTable.ts","../../forge-govuk-components/src/components/tabs/govukTabs.ts","../../forge-govuk-components/src/components/tag/govukTag.ts","../../forge-govuk-components/src/components/task-list/govukTaskList.ts","../../forge-govuk-components/src/components/warning-text/govukWarningText.ts","../../forge-govuk-components/src/components/index.ts","../../forge-govuk-components/src/utils/govukUtilityClasses.ts","../../forge-govuk-components/src/utils/validations/dateInputFull.ts","../../forge-govuk-components/src/utils/govukValidations.ts","../../forge-govuk-components/src/utils/toErrorList.ts","../../forge-govuk-components/src/utils/registerForgeGovUKComponentsGlobals.ts"],"sourcesContent":["import type nunjucks from 'nunjucks'\n\nimport { component } from '@ministryofjustice/hmpps-forge/core/components'\nimport type {\n  BlockDefinition,\n  ComponentOptions,\n  EvaluatedBlock,\n  ForgeComponent,\n} from '@ministryofjustice/hmpps-forge/core/components'\n\n/**\n * Render function for Nunjucks components.\n * Receives the evaluated block and a nunjucks environment (passed as renderer by TemplateRenderer).\n */\nexport type NunjucksComponentRenderer<T extends BlockDefinition> = (\n  block: EvaluatedBlock<T>,\n  nunjucksEnv: nunjucks.Environment,\n) => string\n\n/**\n * Defines a Nunjucks component from a single block interface - `component()` with the\n * renderer pinned, so the render callback receives a typed `nunjucks.Environment`.\n *\n * A local copy of the express-nunjucks helper: importing it from that package would\n * pull the express adapter (and express itself) into every browser bundle that uses\n * these components.\n */\nexport function nunjucksComponent<TBlock extends BlockDefinition>(\n  variant: string,\n  options: ComponentOptions<TBlock, string, nunjucks.Environment>,\n): ForgeComponent<TBlock, string> {\n  return component<TBlock, string, nunjucks.Environment>(variant, options)\n}\n","import type { RenderedBlock } from '@ministryofjustice/hmpps-forge/core/components'\n\ntype GovukTextParam<T extends object> = T | { text: string }\n\ninterface GovukError {\n  readonly message: string\n}\n\nexport type GovukRenderedBlockContent = RenderedBlock | readonly RenderedBlock[] | undefined\n\nexport interface GovukTextHtmlContent {\n  readonly text?: string\n  readonly html?: string\n  readonly blocks?: GovukRenderedBlockContent\n}\n\nexport interface GovukNormalisedTextHtmlContent {\n  text?: string\n  html?: string\n}\n\n/**\n * Converts Forge's convenient string-or-object API into the object shape\n * expected by GOV.UK Frontend Nunjucks params.\n */\nexport function normaliseGovukTextParam<T extends object>(\n  value: string | T | undefined,\n): GovukTextParam<T> | undefined {\n  if (typeof value === 'object') {\n    return value\n  }\n\n  if (value === undefined || value === '') {\n    return undefined\n  }\n\n  return { text: value }\n}\n\n/**\n * GOV.UK grouped controls use fieldsets, but Forge also accepts a simple label\n * for the common case where only the legend text needs to be supplied.\n */\nexport function normaliseGovukFieldset<T extends object>(\n  fieldset: T | undefined,\n  legendText: string | undefined,\n): T | { legend: { text: string } } | undefined {\n  if (fieldset) {\n    return fieldset\n  }\n\n  if (legendText === undefined || legendText === '') {\n    return undefined\n  }\n\n  return {\n    legend: {\n      text: legendText,\n    },\n  }\n}\n\nexport function normaliseGovukErrorMessage(errors: readonly GovukError[] | undefined): { text: string } | undefined {\n  const firstError = errors?.[0]\n\n  if (!firstError || firstError.message === '') {\n    return undefined\n  }\n\n  return { text: firstError.message }\n}\n\nexport function renderGovukBlocksToHtml(blocks: GovukRenderedBlockContent): string | undefined {\n  if (!blocks) {\n    return undefined\n  }\n\n  const renderedBlocks = Array.isArray(blocks) ? blocks : [blocks]\n\n  if (renderedBlocks.length === 0) {\n    return undefined\n  }\n\n  return renderedBlocks.map(block => block.html).join('')\n}\n\nexport function normaliseGovukTextHtmlContent(content: GovukTextHtmlContent): GovukNormalisedTextHtmlContent {\n  const blocksHtml = renderGovukBlocksToHtml(content.blocks)\n  const html = blocksHtml ?? content.html\n\n  return {\n    text: html !== undefined ? undefined : content.text,\n    html,\n  }\n}\n","import {\n  BlockDefinition,\n  ResolvableArray,\n  ResolvableNumber,\n  ResolvableBoolean,\n  ResolvableString,\n  EvaluatedBlock,\n} from '@ministryofjustice/hmpps-forge/core/components'\nimport { nunjucksComponent } from '../../utils/nunjucksComponent'\nimport { normaliseGovukTextHtmlContent } from '../../utils/govukParamNormalisers'\n\n/**\n * Heading configuration for an accordion section.\n * Displays as the clickable header that expands/collapses the section.\n */\nexport interface AccordionItemHeading {\n  /** Plain text content for the heading. Required unless html is provided. */\n  text?: ResolvableString\n\n  /**\n   * HTML content for the heading. Takes precedence over text.\n   * Note: The header is inside a `<button>` element, so only phrasing content is allowed.\n   */\n  html?: ResolvableString\n}\n\n/**\n * Summary line configuration for an accordion section.\n * Optional additional text displayed alongside the heading.\n */\nexport interface AccordionItemSummary {\n  /** Plain text content for the summary line. */\n  text?: ResolvableString\n\n  /**\n   * HTML content for the summary line. Takes precedence over text.\n   * Note: The summary line is inside a `<button>` element, so only phrasing content is allowed.\n   */\n  html?: ResolvableString\n}\n\n/**\n * Content configuration for an accordion section.\n * The content that is shown when the section is expanded.\n */\nexport interface AccordionItemContent {\n  /** Plain text content for the section. Required unless html or blocks is provided. */\n  text?: ResolvableString\n\n  /** HTML content for the section. Takes precedence over text. */\n  html?: ResolvableString\n\n  /** Child blocks to render in the section. Takes precedence over text/html. */\n  blocks?: BlockDefinition[]\n}\n\n/**\n * An individual section within the accordion.\n */\nexport interface AccordionItem {\n  /** The heading of the accordion section. Required. */\n  heading: AccordionItemHeading\n\n  /** Optional summary line displayed alongside the heading. */\n  summary?: AccordionItemSummary\n\n  /** The content of the accordion section. Required. */\n  content: AccordionItemContent\n\n  /** Whether the section should be expanded when the page loads. Defaults to false. */\n  expanded?: ResolvableBoolean\n\n  /**\n   * Conditional visibility for this section. When the evaluated value is `false`,\n   * the section is omitted from rendering. Defaults to showing the section.\n   */\n  visibleWhen?: ResolvableBoolean\n}\n\n/**\n * GOV.UK Accordion component.\n *\n * Renders as a vertically stacked set of interactive headings that reveal or hide content.\n *\n * @see https://design-system.service.gov.uk/components/accordion/\n * @example\n * ```typescript\n * GovUKAccordion({\n *   id: 'accordion-default',\n *   items: [\n *     {\n *       heading: { text: 'Writing well for the web' },\n *       content: { text: 'This is the content for the first section.' },\n *     },\n *     {\n *       heading: { text: 'Writing well for specialists' },\n *       summary: { text: 'Guidance for technical writers' },\n *       content: { text: 'This is the content for the second section.' },\n *     },\n *   ],\n * })\n * ```\n *\n * @example With child blocks as content\n * ```typescript\n * GovUKAccordion({\n *   id: 'accordion-with-blocks',\n *   items: [\n *     {\n *       heading: { text: 'Section with nested components' },\n *       content: {\n *         blocks: [\n *           GovUKInsetText({ text: 'Important information' }),\n *           GovUKWarningText({ text: 'Warning message' }),\n *         ],\n *       },\n *     },\n *   ],\n * })\n * ```\n */\nexport interface GovUKAccordion extends BlockDefinition {\n  /**\n   * Unique ID for the accordion.\n   * Must be unique across the domain if `rememberExpanded` is true, as the expanded state\n   * persists across page loads using session storage.\n   */\n  id: ResolvableString\n\n  /** The sections within the accordion. Required. Supports dynamic expressions. */\n  items: ResolvableArray<AccordionItem>\n\n  /** Heading level for section headings, from 1 to 6. Defaults to 2. */\n  headingLevel?: ResolvableNumber\n\n  /**\n   * Whether the expanded/collapsed state should persist across page loads.\n   * Uses session storage. Defaults to true.\n   */\n  rememberExpanded?: ResolvableBoolean\n\n  /** Text for the \"Hide all sections\" button when all sections are expanded. */\n  hideAllSectionsText?: ResolvableString\n\n  /** Text for the \"Show all sections\" button when at least one section is collapsed. */\n  showAllSectionsText?: ResolvableString\n\n  /** Text for the \"Hide\" button within each expanded section. */\n  hideSectionText?: ResolvableString\n\n  /** Text for the \"Show\" button within each collapsed section. */\n  showSectionText?: ResolvableString\n\n  /** Accessible label text when section is expanded. Defaults to \"Hide this section\". */\n  hideSectionAriaLabelText?: ResolvableString\n\n  /** Accessible label text when section is collapsed. Defaults to \"Show this section\". */\n  showSectionAriaLabelText?: ResolvableString\n\n  /** Additional CSS classes for the accordion element. */\n  classes?: ResolvableString\n\n  /** Custom HTML attributes for the accordion element. */\n  attributes?: Record<string, any>\n}\n\n/** Evaluated accordion item after expression resolution */\ntype EvaluatedAccordionItem = EvaluatedBlock<AccordionItem, false>\n\n/**\n * GOV.UK Accordion component.\n *\n * Renders as a vertically stacked set of interactive headings that reveal or hide content.\n *\n * @see https://design-system.service.gov.uk/components/accordion/\n * @example\n * ```typescript\n * GovUKAccordion({\n *   id: 'accordion-default',\n *   items: [\n *     {\n *       heading: { text: 'Writing well for the web' },\n *       content: { text: 'This is the content for the first section.' },\n *     },\n *     {\n *       heading: { text: 'Writing well for specialists' },\n *       summary: { text: 'Guidance for technical writers' },\n *       content: { text: 'This is the content for the second section.' },\n *     },\n *   ],\n * })\n * ```\n *\n * @example With child blocks as content\n * ```typescript\n * GovUKAccordion({\n *   id: 'accordion-with-blocks',\n *   items: [\n *     {\n *       heading: { text: 'Section with nested components' },\n *       content: {\n *         blocks: [\n *           GovUKInsetText({ text: 'Important information' }),\n *           GovUKWarningText({ text: 'Warning message' }),\n *         ],\n *       },\n *     },\n *   ],\n * })\n * ```\n */\nexport const GovUKAccordion = nunjucksComponent<GovUKAccordion>('govukAccordion', {\n  render: (props, nunjucksEnv) => {\n    // Process items, handling child blocks in content\n    // NOTE: items is typed as ResolvableArray<AccordionItem> which resolves to EvaluatedAccordionItem[] at runtime\n    const items = props.items as EvaluatedAccordionItem[]\n    const processedItems = items\n      .filter(item => item.visibleWhen !== false)\n      .map(item => {\n        const content = normaliseGovukTextHtmlContent({\n          text: item.content.text,\n          html: item.content.html,\n          blocks: item.content.blocks,\n        })\n\n        return {\n          heading: {\n            text: item.heading.html ? undefined : item.heading.text,\n            html: item.heading.html,\n          },\n          summary: item.summary\n            ? {\n                text: item.summary.html ? undefined : item.summary.text,\n                html: item.summary.html,\n              }\n            : undefined,\n          content: {\n            text: content.text,\n            html: content.html,\n          },\n          expanded: item.expanded,\n        }\n      })\n\n    const params: Record<string, any> = {\n      id: props.id,\n      items: processedItems,\n      headingLevel: props.headingLevel,\n      rememberExpanded: props.rememberExpanded,\n      hideAllSectionsText: props.hideAllSectionsText,\n      showAllSectionsText: props.showAllSectionsText,\n      hideSectionText: props.hideSectionText,\n      showSectionText: props.showSectionText,\n      hideSectionAriaLabelText: props.hideSectionAriaLabelText,\n      showSectionAriaLabelText: props.showSectionAriaLabelText,\n      classes: props.classes,\n      attributes: props.attributes,\n    }\n\n    return nunjucksEnv.render('govuk/components/accordion/template.njk', { params })\n  },\n})\n","import { BlockDefinition, ResolvableString } from '@ministryofjustice/hmpps-forge/core/components'\nimport { nunjucksComponent } from '../../utils/nunjucksComponent'\n\n/**\n * GOV.UK Back Link component.\n *\n * Use this to help users go back to the previous page in a multi-page transaction.\n * Should be placed at the top of the page, before the main content.\n *\n * @see https://design-system.service.gov.uk/components/back-link/\n * @example\n * ```typescript\n * GovUKBackLink({\n *   href: '/previous-page',\n * })\n *\n * // With custom text\n * GovUKBackLink({\n *   href: '/dashboard',\n *   text: 'Return to dashboard',\n * })\n * ```\n */\nexport interface GovUKBackLink extends BlockDefinition {\n  /**\n   * The value of the link's `href` attribute.\n   * This is the URL that the user will be taken to when they click the back link.\n   */\n  href: ResolvableString\n\n  /**\n   * Plain text content for the back link.\n   * Defaults to \"Back\" if neither `text` nor `html` is provided.\n   * If `html` is provided, this option will be ignored.\n   */\n  text?: ResolvableString\n\n  /**\n   * HTML content for the back link.\n   * Takes precedence over `text` if both are provided.\n   * Defaults to \"Back\" if neither `text` nor `html` is provided.\n   */\n  html?: ResolvableString\n\n  /**\n   * Additional CSS classes to add to the anchor tag.\n   * Use this to apply custom styling or modifier classes.\n   */\n  classes?: ResolvableString\n\n  /**\n   * HTML attributes (for example data attributes) to add to the anchor tag.\n   * Useful for adding custom data attributes or ARIA attributes.\n   */\n  attributes?: Record<string, any>\n}\n\n/**\n * GOV.UK Back Link component.\n *\n * Use this to help users go back to the previous page in a multi-page transaction.\n * Should be placed at the top of the page, before the main content.\n *\n * @see https://design-system.service.gov.uk/components/back-link/\n * @example\n * ```typescript\n * GovUKBackLink({\n *   href: '/previous-page',\n * })\n *\n * // With custom text\n * GovUKBackLink({\n *   href: '/dashboard',\n *   text: 'Return to dashboard',\n * })\n * ```\n */\nexport const GovUKBackLink = nunjucksComponent<GovUKBackLink>('govukBackLink', {\n  render: (props, nunjucksEnv) => {\n    const params: Record<string, any> = {\n      href: props.href,\n      text: props.html ? undefined : props.text,\n      html: props.html,\n      classes: props.classes,\n      attributes: props.attributes,\n    }\n\n    return nunjucksEnv.render('govuk/components/back-link/template.njk', { params })\n  },\n})\n","import { BlockDefinition, ResolvableString } from '@ministryofjustice/hmpps-forge/core/components'\nimport { jsxComponent, raw } from '@ministryofjustice/hmpps-forge/jsx-components'\n\ntype BodySize = 'l' | 's'\n\n/**\n * GOV.UK styled paragraph.\n *\n * @see https://design-system.service.gov.uk/styles/paragraphs/\n * @example\n * ```typescript\n * GovUKBody({ text: 'Standard paragraph text' })\n * GovUKBody({ text: Format('Hello %1', name) })\n * GovUKBody({ text: 'Introductory lead paragraph', size: 'l' })\n * GovUKBody({ text: 'Small print text', size: 's' })\n * ```\n */\nexport interface GovUKBody extends BlockDefinition {\n  /**\n   * Text content for the paragraph. Supports dynamic expressions.\n   *\n   * **Rendered as raw HTML without sanitization** - escape untrusted data with\n   * `Transformer.String.EscapeHtml()` before interpolating it.\n   */\n  text: ResolvableString\n\n  /** Paragraph size variant. 'l' for lead paragraph (24px), 's' for small (16px). Omit for default (19px). */\n  size?: BodySize\n\n  /** Additional CSS classes to append to the paragraph. */\n  classes?: ResolvableString\n\n  /** HTML attributes to add to the paragraph element. */\n  attributes?: Record<string, any>\n}\n\n/**\n * GOV.UK styled paragraph.\n *\n * @see https://design-system.service.gov.uk/styles/paragraphs/\n * @example\n * ```typescript\n * GovUKBody({ text: 'Standard paragraph text' })\n * GovUKBody({ text: 'Introductory lead paragraph', size: 'l' })\n * ```\n */\nexport const GovUKBody = jsxComponent<GovUKBody>('govukBody', {\n  render: props => {\n    const className = [props.size ? `govuk-body-${props.size}` : 'govuk-body', props.classes]\n      .filter(Boolean)\n      .join(' ')\n\n    return (\n      <p class={className} {...props.attributes}>\n        {raw(props.text)}\n      </p>\n    )\n  },\n})\n","import {\n  BlockDefinition,\n  ResolvableArray,\n  ResolvableBoolean,\n  ResolvableString,\n} from '@ministryofjustice/hmpps-forge/core/components'\nimport { nunjucksComponent } from '../../utils/nunjucksComponent'\n\n/**\n * Individual breadcrumb item configuration.\n */\nexport interface BreadcrumbItem {\n  /** Plain text content for the breadcrumb. Required unless html is provided. */\n  text?: ResolvableString\n\n  /** HTML content for the breadcrumb. Takes precedence over text. */\n  html?: ResolvableString\n\n  /** Link URL for the breadcrumb. If not specified, renders as plain text. */\n  href?: ResolvableString\n\n  /** Custom HTML attributes for the breadcrumb item. */\n  attributes?: Record<string, any>\n\n  /**\n   * Conditional visibility for this breadcrumb. When the evaluated value is `false`,\n   * the item is omitted from rendering. Defaults to showing the item.\n   */\n  visibleWhen?: ResolvableBoolean\n}\n\n/**\n * GOV.UK Breadcrumbs component.\n *\n * Use this to help users understand where they are in the website's structure\n * and navigate back to higher levels.\n *\n * @see https://design-system.service.gov.uk/components/breadcrumbs/\n * @example\n * ```typescript\n * GovUKBreadcrumbs({\n *   items: [\n *     { text: 'Home', href: '/' },\n *     { text: 'Passports, travel and living abroad', href: '/browse/abroad' },\n *     { text: 'Travel abroad' },\n *   ],\n * })\n * ```\n */\nexport interface GovUKBreadcrumbs extends BlockDefinition {\n  /** The breadcrumb items to display. Required. */\n  items: ResolvableArray<BreadcrumbItem>\n\n  /** When true, collapses to first and last item only on mobile. */\n  collapseOnMobile?: ResolvableBoolean\n\n  /** Accessibility label for the navigation landmark. Defaults to \"Breadcrumb\". */\n  labelText?: ResolvableString\n\n  /** Additional CSS classes for the breadcrumbs container. */\n  classes?: ResolvableString\n\n  /** Custom HTML attributes for the breadcrumbs container. */\n  attributes?: Record<string, any>\n}\n\n/**\n * GOV.UK Breadcrumbs component.\n *\n * Use this to help users understand where they are in the website's structure\n * and navigate back to higher levels.\n *\n * @see https://design-system.service.gov.uk/components/breadcrumbs/\n * @example\n * ```typescript\n * GovUKBreadcrumbs({\n *   items: [\n *     { text: 'Home', href: '/' },\n *     { text: 'Passports, travel and living abroad', href: '/browse/abroad' },\n *     { text: 'Travel abroad' },\n *   ],\n * })\n * ```\n */\nexport const GovUKBreadcrumbs = nunjucksComponent<GovUKBreadcrumbs>('govukBreadcrumbs', {\n  render: (props, nunjucksEnv) => {\n    const params: Record<string, any> = {\n      items: props.items.filter(item => item.visibleWhen !== false),\n      collapseOnMobile: props.collapseOnMobile,\n      labelText: props.labelText,\n      classes: props.classes,\n      attributes: props.attributes,\n    }\n\n    return nunjucksEnv.render('govuk/components/breadcrumbs/template.njk', { params })\n  },\n})\n","import type nunjucks from 'nunjucks'\nimport {\n  BlockDefinition,\n  ResolvableBoolean,\n  ResolvableString,\n  ResolvedPropsOf,\n} from '@ministryofjustice/hmpps-forge/core/components'\nimport { nunjucksComponent } from '../../utils/nunjucksComponent'\n\n/**\n * GOV.UK Button component.\n *\n * Creates a button for form submission. Renders as a `<button>` element with form\n * submission capabilities.\n *\n * @see https://design-system.service.gov.uk/components/button/\n * @example\n * ```typescript\n * GovUKButton({\n *   text: 'Save and continue',\n *   buttonType: 'submit',\n *   name: 'action',\n *   value: 'save',\n * })\n * ```\n */\nexport interface GovUKButton extends BlockDefinition {\n  /** Text content for the button */\n  text?: ResolvableString\n\n  /** HTML content for the button */\n  html?: ResolvableString\n\n  /** Additional CSS classes */\n  classes?: ResolvableString\n\n  /** Custom HTML attributes */\n  attributes?: Record<string, any>\n\n  /** Style as start/call-to-action button */\n  isStartButton?: ResolvableBoolean\n\n  /** Button ID */\n  id?: ResolvableString\n\n  /** Name attribute for form submission, defaults to 'action' */\n  name?: ResolvableString\n\n  /** Type attribute for button/input elements - defaults to 'submit' */\n  buttonType?: 'button' | 'submit' | 'reset'\n\n  /** Value attribute for button elements */\n  value?: ResolvableString\n\n  /** Whether the button is disabled */\n  disabled?: ResolvableBoolean\n\n  /** Prevent double-click submission */\n  preventDoubleClick?: ResolvableBoolean\n}\n\n/**\n * GOV.UK Link Button component.\n *\n * Creates a button for navigation. Renders as an `<a>` element styled as a button.\n *\n * @see https://design-system.service.gov.uk/components/button/\n * @example\n * ```typescript\n * GovUKLinkButton({\n *   text: 'Start now',\n *   href: '/application/start',\n *   isStartButton: true,\n * })\n * ```\n */\nexport interface GovUKLinkButton extends BlockDefinition {\n  /** Text content for the button */\n  text?: ResolvableString\n\n  /** HTML content for the button */\n  html?: ResolvableString\n\n  /** Additional CSS classes */\n  classes?: ResolvableString\n\n  /** Custom HTML attributes */\n  attributes?: Record<string, any>\n\n  /** Style as start/call-to-action button */\n  isStartButton?: ResolvableBoolean\n\n  /** Button ID */\n  id?: ResolvableString\n\n  /** URL for the link */\n  href: ResolvableString\n}\n\nfunction isLinkButton(\n  props: ResolvedPropsOf<GovUKButton> | ResolvedPropsOf<GovUKLinkButton>,\n): props is ResolvedPropsOf<GovUKLinkButton> {\n  return 'href' in props && props.href !== undefined\n}\n\n/**\n * Shared renderer function for both button types.\n * Determines the appropriate element type and parameters based on the variant.\n */\nfunction buttonRenderer(\n  props: ResolvedPropsOf<GovUKButton> | ResolvedPropsOf<GovUKLinkButton>,\n  nunjucksEnv: nunjucks.Environment,\n): string {\n  let params: Record<string, any> = {\n    id: props.id,\n    text: props.html ? undefined : props.text,\n    html: props.html,\n    classes: props.classes,\n    attributes: props.attributes,\n    isStartButton: props.isStartButton,\n  }\n\n  if (isLinkButton(props)) {\n    params = {\n      ...params,\n      href: props.href,\n    }\n  } else {\n    params = {\n      ...params,\n      name: props.name ?? 'action',\n      type: props.buttonType || 'submit',\n      value: props.value,\n      disabled: props.disabled,\n      preventDoubleClick: props.preventDoubleClick,\n    }\n  }\n\n  return nunjucksEnv.render('govuk/components/button/template.njk', { params })\n}\n\n/**\n * GOV.UK Button component.\n *\n * Creates a button for form submission. Renders as a `<button>` element with form\n * submission capabilities.\n *\n * @see https://design-system.service.gov.uk/components/button/\n * @example\n * ```typescript\n * GovUKButton({\n *   text: 'Save and continue',\n *   buttonType: 'submit',\n *   name: 'action',\n *   value: 'save',\n * })\n * ```\n */\nexport const GovUKButton = nunjucksComponent<GovUKButton>('govukButton', {\n  render: buttonRenderer,\n})\n\n/**\n * GOV.UK Link Button component.\n *\n * Creates a button for navigation. Renders as an `<a>` element styled as a button.\n *\n * @see https://design-system.service.gov.uk/components/button/\n * @example\n * ```typescript\n * GovUKLinkButton({\n *   text: 'Start now',\n *   href: '/application/start',\n *   isStartButton: true,\n * })\n * ```\n */\nexport const GovUKLinkButton = nunjucksComponent<GovUKLinkButton>('govukLinkButton', {\n  render: buttonRenderer,\n})\n","import { BlockDefinition, ResolvableString } from '@ministryofjustice/hmpps-forge/core/components'\nimport { jsxComponent, raw } from '@ministryofjustice/hmpps-forge/jsx-components'\n\n/**\n * Wraps child blocks in a GOV.UK button group layout.\n *\n * @see https://design-system.service.gov.uk/components/button/#grouping-buttons\n * @example\n * ```typescript\n * GovUKButtonGroup({\n *   buttons: [\n *     GovUKButton({ text: 'Save and continue' }),\n *     GovUKButton({ text: 'Cancel', classes: 'govuk-button--secondary' }),\n *   ],\n * })\n * ```\n */\nexport interface GovUKButtonGroup extends BlockDefinition {\n  /** The buttons/links to render inside the group. */\n  buttons: BlockDefinition[]\n\n  /** Additional CSS classes to append to the button group. */\n  classes?: ResolvableString\n\n  /** HTML attributes to add to the wrapper element. */\n  attributes?: Record<string, any>\n}\n\n/**\n * Wraps child blocks in a GOV.UK button group layout.\n *\n * @see https://design-system.service.gov.uk/components/button/#grouping-buttons\n * @example\n * ```typescript\n * GovUKButtonGroup({\n *   buttons: [GovUKButton({ text: 'Save and continue' })],\n * })\n * ```\n */\nexport const GovUKButtonGroup = jsxComponent<GovUKButtonGroup>('govukButtonGroup', {\n  render: props => {\n    const className = props.classes ? `govuk-button-group ${props.classes}` : 'govuk-button-group'\n\n    return (\n      <div class={className} {...props.attributes}>\n        {props.buttons.map(button => raw(button.html))}\n      </div>\n    )\n  },\n})\n","import {\n  BlockDefinition,\n  ResolvableArray,\n  ResolvableString,\n} from '@ministryofjustice/hmpps-forge/core/components'\nimport { jsxComponent, raw } from '@ministryofjustice/hmpps-forge/jsx-components'\n\ntype GridColumnWidth = 'full' | 'one-half' | 'one-third' | 'two-thirds' | 'one-quarter' | 'three-quarters' | 'one-sixth'\n\nexport interface GovUKGridColumn {\n  width: GridColumnWidth\n  blocks: BlockDefinition[]\n}\n\n/**\n * Wraps child blocks in a GOV.UK grid row with responsive column widths.\n *\n * @see https://design-system.service.gov.uk/styles/layout/#grid-system\n * @example\n * ```typescript\n * GovUKGridRow({\n *   columns: [\n *     { width: 'one-quarter', blocks: [labelBlock] },\n *     { width: 'two-thirds', blocks: [inputField] },\n *     { width: 'one-sixth', blocks: [removeButton] },\n *   ],\n * })\n * ```\n */\nexport interface GovUKGridRow extends BlockDefinition {\n  /** Column definitions with width and child blocks. */\n  columns: ResolvableArray<GovUKGridColumn>\n\n  /** Additional CSS classes to append to the row. */\n  classes?: ResolvableString\n\n  /** HTML attributes to add to the row element. */\n  attributes?: Record<string, any>\n}\n\n/**\n * Wraps child blocks in a GOV.UK grid row with responsive column widths.\n *\n * @see https://design-system.service.gov.uk/styles/layout/#grid-system\n * @example\n * ```typescript\n * GovUKGridRow({\n *   columns: [{ width: 'one-half', blocks: [textInput] }],\n * })\n * ```\n */\nexport const GovUKGridRow = jsxComponent<GovUKGridRow>('govukGridRow', {\n  render: props => {\n    const className = props.classes ? `govuk-grid-row ${props.classes}` : 'govuk-grid-row'\n\n    return (\n      <div class={className} {...props.attributes}>\n        {props.columns.map(column => (\n          <div class={`govuk-grid-column-${column.width}`}>{column.blocks.map(block => raw(block.html))}</div>\n        ))}\n      </div>\n    )\n  },\n})\n","import { BlockDefinition, ResolvableString } from '@ministryofjustice/hmpps-forge/core/components'\nimport { jsxComponent, raw } from '@ministryofjustice/hmpps-forge/jsx-components'\n\ntype HeadingSize = 'xl' | 'l' | 'm' | 's'\ntype HeadingLevel = 1 | 2 | 3 | 4\ntype HeadingTag = 'h1' | 'h2' | 'h3' | 'h4'\n\nconst defaultLevels: Record<HeadingSize, HeadingLevel> = {\n  xl: 1,\n  l: 1,\n  m: 2,\n  s: 3,\n}\n\n/**\n * GOV.UK heading with an optional caption.\n * Automatically pairs caption size to heading size (e.g. govuk-caption-l with govuk-heading-l).\n *\n * @see https://design-system.service.gov.uk/styles/headings/\n * @example\n * ```typescript\n * GovUKHeading({ text: 'Page title' })\n * GovUKHeading({ text: 'Page title', size: 'xl', caption: 'Section name' })\n * GovUKHeading({ text: Format('Goal: %1', goalTitle), size: 'm', level: 2 })\n * ```\n */\nexport interface GovUKHeading extends BlockDefinition {\n  /**\n   * Heading text content. Supports dynamic expressions.\n   *\n   * **Rendered as raw HTML without sanitization** - escape untrusted data with\n   * `Transformer.String.EscapeHtml()` before interpolating it.\n   */\n  text: ResolvableString\n\n  /** Visual size of the heading. Defaults to 'l'. */\n  size?: HeadingSize\n\n  /** HTML heading level (1-4). Defaults based on size: xl/l→h1, m→h2, s→h3. */\n  level?: HeadingLevel\n\n  /**\n   * Optional caption displayed above the heading. Matches the heading size class automatically.\n   *\n   * **Rendered as raw HTML without sanitization** - escape untrusted data with\n   * `Transformer.String.EscapeHtml()` before interpolating it.\n   */\n  caption?: ResolvableString\n\n  /** Additional CSS classes to append to the heading. */\n  classes?: ResolvableString\n\n  /** HTML attributes to add to the heading element. */\n  attributes?: Record<string, any>\n}\n\n/**\n * GOV.UK heading with an optional caption.\n * Automatically pairs caption size to heading size (e.g. govuk-caption-l with govuk-heading-l).\n *\n * @see https://design-system.service.gov.uk/styles/headings/\n * @example\n * ```typescript\n * GovUKHeading({ text: 'Page title' })\n * GovUKHeading({ text: 'Page title', size: 'xl', caption: 'Section name' })\n * ```\n */\nexport const GovUKHeading = jsxComponent<GovUKHeading>('govukHeading', {\n  render: props => {\n    // Evaluation widens the literal prop types, so pin the tag back to the union\n    const size = (props.size ?? 'l') as HeadingSize\n    const Tag = `h${props.level ?? defaultLevels[size]}` as HeadingTag\n    const className = props.classes ? `govuk-heading-${size} ${props.classes}` : `govuk-heading-${size}`\n\n    return (\n      <Tag class={className} {...props.attributes}>\n        {props.caption && <span class={`govuk-caption-${size}`}>{raw(props.caption)}</span>}\n        {raw(props.text)}\n      </Tag>\n    )\n  },\n})\n","import {\n  BlockDefinition,\n  ResolvableArray,\n  ResolvableBoolean,\n  ResolvableString,\n} from '@ministryofjustice/hmpps-forge/core/components'\nimport { jsxComponent, raw } from '@ministryofjustice/hmpps-forge/jsx-components'\n\ntype ListType = 'bullet' | 'number'\n\n/**\n * GOV.UK styled list. Items can be strings, child blocks, or a mix of the two.\n *\n * @see https://design-system.service.gov.uk/styles/lists/\n * @example\n * ```typescript\n * GovUKList({ items: Data('suggestions'), style: 'bullet' })\n * GovUKList({ items: Data('steps'), style: 'number', spaced: true })\n * GovUKList({\n *   items: [\n *     GovUKBody({ text: 'A paragraph item' }),\n *     HtmlBlock({ tag: 'a', attributes: { href: '/help' }, content: 'A link item' }),\n *   ],\n * })\n * ```\n */\nexport interface GovUKList extends BlockDefinition {\n  /**\n   * The list items - strings, child blocks, or a dynamic expression evaluating to an array.\n   *\n   * **String items are rendered as raw HTML without sanitization** - escape untrusted data\n   * with `Transformer.String.EscapeHtml()` before interpolating it.\n   */\n  items: ResolvableArray<ResolvableString | BlockDefinition>\n\n  /** List style. 'bullet' for unordered, 'number' for ordered. Omit for plain list. */\n  style?: ListType\n\n  /** Whether to add extra spacing between list items. */\n  spaced?: ResolvableBoolean\n\n  /** Additional CSS classes to append to the list. */\n  classes?: ResolvableString\n\n  /** HTML attributes to add to the list element. */\n  attributes?: Record<string, any>\n}\n\n/**\n * GOV.UK styled list. Items can be strings, child blocks, or a mix of the two.\n *\n * @see https://design-system.service.gov.uk/styles/lists/\n * @example\n * ```typescript\n * GovUKList({ items: Data('suggestions'), style: 'bullet' })\n * GovUKList({ items: ['First step', GovUKBody({ text: 'Second step' })], style: 'number' })\n * ```\n */\nexport const GovUKList = jsxComponent<GovUKList>('govukList', {\n  render: props => {\n    // Evaluation widens the literal prop types, so pin the type back to the union\n    const style = props.style as ListType | undefined\n    const Tag = style === 'number' ? 'ol' : 'ul'\n    const className = ['govuk-list', style && `govuk-list--${style}`, props.spaced && 'govuk-list--spaced', props.classes]\n      .filter(Boolean)\n      .join(' ')\n\n    return (\n      <Tag class={className} {...props.attributes}>\n        {props.items.map(item => (\n          <li>{raw(typeof item === 'object' && item !== null ? item.html : item)}</li>\n        ))}\n      </Tag>\n    )\n  },\n})\n","import {\n  BlockDefinition,\n  ResolvableBoolean,\n  ResolvableString,\n} from '@ministryofjustice/hmpps-forge/core/components'\nimport { jsxComponent } from '@ministryofjustice/hmpps-forge/jsx-components'\n\ntype SectionBreakSize = 'xl' | 'l' | 'm'\n\n/**\n * GOV.UK section break (thematic `<hr>` between content sections).\n *\n * @see https://design-system.service.gov.uk/styles/section-break/\n * @example\n * ```typescript\n * GovUKSectionBreak({ size: 'l', visible: true })\n * GovUKSectionBreak({ size: 'xl' })\n * GovUKSectionBreak()\n * ```\n */\nexport interface GovUKSectionBreak extends BlockDefinition {\n  /** Size of the section break margin. Omit for default (smallest) spacing. */\n  size?: SectionBreakSize\n\n  /** Whether to show a visible horizontal rule. Defaults to false (spacing only). */\n  visible?: ResolvableBoolean\n\n  /** Additional CSS classes to append to the section break. */\n  classes?: ResolvableString\n\n  /** HTML attributes to add to the hr element. */\n  attributes?: Record<string, any>\n}\n\n/**\n * GOV.UK section break (thematic `<hr>` between content sections).\n *\n * @see https://design-system.service.gov.uk/styles/section-break/\n * @example\n * ```typescript\n * GovUKSectionBreak({ size: 'l', visible: true })\n * GovUKSectionBreak()\n * ```\n */\nexport const GovUKSectionBreak = jsxComponent<GovUKSectionBreak>('govukSectionBreak', {\n  render: props => {\n    const className = [\n      'govuk-section-break',\n      props.size && `govuk-section-break--${props.size}`,\n      props.visible && 'govuk-section-break--visible',\n      props.classes,\n    ]\n      .filter(Boolean)\n      .join(' ')\n\n    return <hr class={className} {...props.attributes} />\n  },\n})\n","import { z } from 'zod'\nimport {\n  FieldBlockDefinition,\n  ResolvableBoolean,\n  ResolvableString,\n} from '@ministryofjustice/hmpps-forge/core/components'\nimport { nunjucksComponent } from '../../utils/nunjucksComponent'\nimport { normaliseGovukErrorMessage, normaliseGovukTextParam } from '../../utils/govukParamNormalisers'\n\n/**\n * GOV.UK Text Input component.\n * A single-line text input component following the GOV.UK Design System patterns.\n *\n * @see https://design-system.service.gov.uk/components/text-input/\n * @example\n * ```typescript\n * GovUKTextInput({\n *   code: 'email',\n *   label: 'Email address',\n *   hint: 'We will only use this to contact you about your application',\n *   autocomplete: 'email',\n * })\n * ```\n */\nexport interface GovUKTextInput extends FieldBlockDefinition {\n  /**\n   * The ID of the input. Defaults to the value of `code` if not provided.\n   * @example 'user-email'\n   */\n  id?: ResolvableString\n\n  /**\n   * The label used by the text input component.\n   * Can be a simple string or a complex object with additional properties.\n   *\n   * @example 'Full name' // Simple string label\n   * @example { text: 'Email address', classes: 'govuk-label--l' } // Object with styling\n   */\n  label:\n    | ResolvableString\n    | {\n        /** Text content of the label */\n        text?: ResolvableString\n        /** HTML content of the label (takes precedence over text) */\n        html?: ResolvableString\n        /** Additional CSS classes for the label */\n        classes?: ResolvableString\n        /** For attribute - automatically set if not provided */\n        for?: ResolvableString\n        /** Whether to render the label as a page heading (wrapped in h1) */\n        isPageHeading?: ResolvableBoolean\n        /** Additional HTML attributes for the label */\n        attributes?: Record<string, any>\n      }\n\n  /**\n   * Can be used to add a hint to the text input component.\n   * Provides additional context or instructions for the user.\n   *\n   * @example 'For example, john.smith@example.com' // Simple hint\n   * @example { html: 'We'll only use this to send you <strong>important updates</strong>' } // Rich HTML hint\n   */\n  hint?:\n    | ResolvableString\n    | {\n        /** Text content of the hint */\n        text?: ResolvableString\n        /** HTML content of the hint (takes precedence over text) */\n        html?: ResolvableString\n        /** Additional CSS classes for the hint */\n        classes?: ResolvableString\n        /** Unique ID for the hint (auto-generated if not provided) */\n        id?: ResolvableString\n        /** Additional HTML attributes for the hint */\n        attributes?: Record<string, any>\n      }\n\n  /**\n   * Type of input control to render. Defaults to \"text\".\n   * Different types provide specialized keyboard layouts and validation on mobile devices.\n   *\n   * @example 'email' // Email keyboard on mobile\n   * @example 'password' // Masked input\n   * @example 'tel' // Numeric keyboard for phone numbers\n   */\n  inputType?: 'text' | 'email' | 'url' | 'tel' | 'password' | 'number'\n\n  /**\n   * Optional value for the inputmode attribute.\n   * Provides hints about the expected input type to optimize virtual keyboards.\n   *\n   * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode\n   * @example 'email' // Email-optimized keyboard\n   * @example 'decimal' // Numeric keyboard with decimal point\n   * @example 'search' // Search-optimized keyboard\n   */\n  inputMode?: 'text' | 'decimal' | 'search' | 'email' | 'url' | 'numeric'\n\n  /**\n   * If `true`, input will be disabled and cannot be edited by the user.\n   * @example true // Disable the input\n   */\n  disabled?: ResolvableBoolean\n\n  /**\n   * Attribute to meet WCAG success criterion 1.3.5: Identify input purpose.\n   * Helps browsers provide appropriate autofill suggestions.\n   *\n   * @see https://www.w3.org/WAI/WCAG22/Understanding/identify-input-purpose.html\n   * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill\n   * @example 'email' // For email address fields\n   * @example 'given-name' // For first name fields\n   * @example 'off' // Disable autocomplete\n   */\n  autocomplete?: ResolvableString\n\n  /**\n   * One or more element IDs to add to the `aria-describedby` attribute.\n   * Used to provide additional descriptive information for screenreader users.\n   *\n   * @example 'email-requirements'\n   */\n  describedBy?: ResolvableString\n\n  /**\n   * Attribute to provide a regular expression pattern for input validation.\n   * Used to match allowed character combinations for the input value.\n   *\n   * @see https://html.spec.whatwg.org/multipage/input.html#the-pattern-attribute\n   * @example '[0-9]*' // Only allow digits\n   * @example '[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\\\.[A-Za-z]{2,}' // Basic email pattern\n   */\n  pattern?: ResolvableString\n\n  /**\n   * Optional field to enable or disable the spellcheck attribute on the input.\n   * When not specified, browsers will use their default behavior.\n   * @example true // Enable spellcheck\n   * @example false // Disable spellcheck (useful for usernames, codes, etc.)\n   */\n  spellcheck?: ResolvableBoolean\n\n  /**\n   * Optional field to enable or disable autocapitalisation of user input.\n   *\n   * @see https://html.spec.whatwg.org/multipage/interaction.html#autocapitalization\n   * @example 'words' // Capitalize first letter of each word\n   * @example 'sentences' // Capitalize first letter of each sentence\n   * @example 'off' // Disable autocapitalization\n   */\n  autocapitalize?: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters'\n\n  /**\n   * Can be used to add a prefix to the text input component.\n   * Useful for currency symbols, units, or other contextual indicators.\n   *\n   * @example { text: '£' } // Currency prefix\n   * @example { html: '<span aria-hidden=\"true\">@</span>' } // Username prefix\n   */\n  prefix?: {\n    /** Text content of the prefix (takes precedence over html if both provided) */\n    text?: ResolvableString\n    /** HTML content of the prefix */\n    html?: ResolvableString\n    /** Additional CSS classes for the prefix */\n    classes?: ResolvableString\n    /** Additional HTML attributes for the prefix element */\n    attributes?: Record<string, any>\n  }\n\n  /**\n   * Can be used to add a suffix to the text input component.\n   * Useful for units of measurement, file extensions, or other contextual indicators.\n   *\n   * @example { text: 'kg' } // Weight unit suffix\n   * @example { text: '.gov.uk' } // Domain suffix\n   */\n  suffix?: {\n    /** Text content of the suffix */\n    text?: ResolvableString\n    /** HTML content of the suffix (takes precedence over text) */\n    html?: ResolvableString\n    /** Additional CSS classes for the suffix element */\n    classes?: ResolvableString\n    /** Additional HTML attributes for the suffix element */\n    attributes?: Record<string, any>\n  }\n\n  /**\n   * Additional options for the form group containing the text input component.\n   * Allows customization of the wrapper element and additional content.\n   */\n  formGroup?: {\n    /**\n     * Classes to add to the form group wrapper.\n     * Useful for custom styling or indicating error states.\n     */\n    classes?: ResolvableString\n    /** HTML attributes to add to the form group wrapper */\n    attributes?: Record<string, any>\n    /**\n     * Content to add before the input element.\n     * Useful for additional instructions or related content.\n     */\n    beforeInput?: {\n      /** Text content to add before the input */\n      text?: ResolvableString\n      /** HTML content to add before the input (takes precedence over text) */\n      html?: ResolvableString\n    }\n    /**\n     * Content to add after the input element.\n     * Useful for format examples or related actions.\n     */\n    afterInput?: {\n      /** Text content to add after the input */\n      text?: ResolvableString\n      /** HTML content to add after the input (takes precedence over text) */\n      html?: ResolvableString\n    }\n  }\n\n  /**\n   * If any of prefix, suffix, formGroup.beforeInput or formGroup.afterInput have a value,\n   * a wrapping element is added around the input and inserted content.\n   * This allows customization of that wrapping element.\n   */\n  inputWrapper?: {\n    /** Additional CSS classes for the input wrapper element */\n    classes?: ResolvableString\n    /** Additional HTML attributes for the input wrapper element */\n    attributes?: Record<string, any>\n  }\n\n  /**\n   * Additional CSS classes to add to the input element.\n   * @example 'govuk-input--width-20' // Fixed width input\n   * @example 'js-character-count' // For character counting functionality\n   */\n  classes?: ResolvableString\n\n  /**\n   * Additional HTML attributes (such as data attributes) to add to the input element.\n   * @example { 'data-module': 'character-count', 'data-maxlength': '100' }\n   * @example { 'aria-describedby': 'additional-help-text' }\n   */\n  attributes?: Record<string, any>\n}\n\n/**\n * GOV.UK Text Input component.\n * A single-line text input component following the GOV.UK Design System patterns.\n *\n * @see https://design-system.service.gov.uk/components/text-input/\n * @example\n * ```typescript\n * GovUKTextInput({\n *   code: 'email',\n *   label: 'Email address',\n *   hint: 'We will only use this to contact you about your application',\n *   autocomplete: 'email',\n * })\n * ```\n */\nexport const GovUKTextInput = nunjucksComponent<GovUKTextInput>('govukTextInput', {\n  field: true,\n  inputSchema: z.string(),\n  // The rendered input's id matches the render params below, so error summary links land on it.\n  errorAnchor: props => props.id ?? props.code,\n  render: (props, nunjucksEnv) => {\n    const params = {\n      id: props.id ?? props.code,\n      name: props.code,\n      label: normaliseGovukTextParam(props.label),\n      hint: normaliseGovukTextParam(props.hint),\n      value: props.value,\n      type: props.inputType ?? 'text',\n      inputmode: props.inputMode,\n      disabled: props.disabled,\n      autocomplete: props.autocomplete,\n      describedBy: props.describedBy,\n      pattern: props.pattern,\n      spellcheck: props.spellcheck,\n      autocapitalize: props.autocapitalize,\n      prefix: props.prefix,\n      suffix: props.suffix,\n      formGroup: props.formGroup,\n      inputWrapper: props.inputWrapper,\n      classes: props.classes,\n      attributes: props.attributes,\n      errorMessage: normaliseGovukErrorMessage(props.errors),\n    }\n\n    return nunjucksEnv.render('govuk/components/input/template.njk', {\n      params,\n    })\n  },\n})\n","import { z } from 'zod'\nimport {\n  FieldBlockDefinition,\n  ResolvableBoolean,\n  ResolvableString,\n} from '@ministryofjustice/hmpps-forge/core/components'\nimport { nunjucksComponent } from '../../utils/nunjucksComponent'\nimport { normaliseGovukErrorMessage, normaliseGovukTextParam } from '../../utils/govukParamNormalisers'\n\n/**\n * GOV.UK Password Input component.\n * A password input component with a show/hide toggle following the GOV.UK Design System patterns.\n *\n * The password input component allows users to enter a password with a toggle button\n * to show or hide the password text. This helps users check they have typed their\n * password correctly, particularly on mobile devices.\n *\n * @see https://design-system.service.gov.uk/components/password-input/\n * @example\n * ```typescript\n * GovUKPasswordInput({\n *   code: 'password',\n *   label: 'Password',\n *   hint: 'Your password must be at least 8 characters',\n *   autocomplete: 'current-password',\n * })\n * ```\n * @example\n * ```typescript\n * // For new password creation (e.g., registration)\n * GovUKPasswordInput({\n *   code: 'new-password',\n *   label: { text: 'Create a password', isPageHeading: true },\n *   hint: 'Your password must contain at least 8 characters, a number, and a special character',\n *   autocomplete: 'new-password',\n * })\n * ```\n */\nexport interface GovUKPasswordInput extends FieldBlockDefinition {\n  /**\n   * The ID of the input. Defaults to the value of `code` if not provided.\n   * @example 'user-password'\n   */\n  id?: ResolvableString\n\n  /**\n   * The label used by the password input component.\n   * Can be a simple string or a complex object with additional properties.\n   *\n   * @example 'Password' // Simple string label\n   * @example { text: 'Create a password', classes: 'govuk-label--l' } // Object with styling\n   */\n  label:\n    | ResolvableString\n    | {\n        /** Text content of the label */\n        text?: ResolvableString\n        /** HTML content of the label (takes precedence over text) */\n        html?: ResolvableString\n        /** Additional CSS classes for the label */\n        classes?: ResolvableString\n        /** For attribute - automatically set if not provided */\n        for?: ResolvableString\n        /** Whether to render the label as a page heading (wrapped in h1) */\n        isPageHeading?: ResolvableBoolean\n        /** Additional HTML attributes for the label */\n        attributes?: Record<string, any>\n      }\n\n  /**\n   * Can be used to add a hint to the password input component.\n   * Provides additional context or instructions for the user.\n   *\n   * @example 'Your password must be at least 8 characters' // Simple hint\n   * @example { html: 'It must contain at least one <strong>number</strong>' } // Rich HTML hint\n   */\n  hint?:\n    | ResolvableString\n    | {\n        /** Text content of the hint */\n        text?: ResolvableString\n        /** HTML content of the hint (takes precedence over text) */\n        html?: ResolvableString\n        /** Additional CSS classes for the hint */\n        classes?: ResolvableString\n        /** Unique ID for the hint (auto-generated if not provided) */\n        id?: ResolvableString\n        /** Additional HTML attributes for the hint */\n        attributes?: Record<string, any>\n      }\n\n  /**\n   * If `true`, input will be disabled and cannot be edited by the user.\n   * @example true // Disable the input\n   */\n  disabled?: ResolvableBoolean\n\n  /**\n   * Attribute to meet WCAG success criterion 1.3.5: Identify input purpose.\n   * Helps browsers provide appropriate autofill suggestions.\n   * Defaults to 'current-password' if not specified.\n   *\n   * @see https://www.w3.org/WAI/WCAG22/Understanding/identify-input-purpose.html\n   * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill\n   * @example 'current-password' // For login forms\n   * @example 'new-password' // For registration or password change forms\n   */\n  autocomplete?: ResolvableString\n\n  /**\n   * One or more element IDs to add to the `aria-describedby` attribute.\n   * Used to provide additional descriptive information for screenreader users.\n   *\n   * @example 'password-requirements'\n   */\n  describedBy?: ResolvableString\n\n  /**\n   * Additional options for the form group containing the password input component.\n   * Allows customization of the wrapper element and additional content.\n   */\n  formGroup?: {\n    /**\n     * Classes to add to the form group wrapper.\n     * Useful for custom styling or indicating error states.\n     */\n    classes?: ResolvableString\n    /** HTML attributes to add to the form group wrapper */\n    attributes?: Record<string, any>\n    /**\n     * Content to add before the input element.\n     * Useful for additional instructions or related content.\n     */\n    beforeInput?: {\n      /** Text content to add before the input */\n      text?: ResolvableString\n      /** HTML content to add before the input (takes precedence over text) */\n      html?: ResolvableString\n    }\n    /**\n     * Content to add after the input element.\n     * Note: The show/hide toggle button is always rendered after the input.\n     * Any afterInput content will be rendered after the toggle button.\n     */\n    afterInput?: {\n      /** Text content to add after the input */\n      text?: ResolvableString\n      /** HTML content to add after the input (takes precedence over text) */\n      html?: ResolvableString\n    }\n  }\n\n  /**\n   * Additional CSS classes to add to the input element.\n   * @example 'govuk-input--width-20' // Fixed width input\n   */\n  classes?: ResolvableString\n\n  /**\n   * Additional HTML attributes (such as data attributes) to add to the input element.\n   * @example { 'data-custom': 'value' }\n   */\n  attributes?: Record<string, any>\n\n  /**\n   * Button text when the password is hidden.\n   * Defaults to 'Show'.\n   *\n   * @example 'Show password'\n   */\n  showPasswordText?: ResolvableString\n\n  /**\n   * Button text when the password is visible.\n   * Defaults to 'Hide'.\n   *\n   * @example 'Hide password'\n   */\n  hidePasswordText?: ResolvableString\n\n  /**\n   * Button text exposed to assistive technologies, like screen readers,\n   * when the password is hidden.\n   * Defaults to 'Show password'.\n   *\n   * @example 'Show your password'\n   */\n  showPasswordAriaLabelText?: ResolvableString\n\n  /**\n   * Button text exposed to assistive technologies, like screen readers,\n   * when the password is visible.\n   * Defaults to 'Hide password'.\n   *\n   * @example 'Hide your password'\n   */\n  hidePasswordAriaLabelText?: ResolvableString\n\n  /**\n   * Announcement made to screen reader users when their password\n   * has become visible in plain text.\n   * Defaults to 'Your password is visible'.\n   *\n   * @example 'Password shown'\n   */\n  passwordShownAnnouncementText?: ResolvableString\n\n  /**\n   * Announcement made to screen reader users when their password\n   * has been obscured and is not visible.\n   * Defaults to 'Your password is hidden'.\n   *\n   * @example 'Password hidden'\n   */\n  passwordHiddenAnnouncementText?: ResolvableString\n\n  /**\n   * Optional object allowing customisation of the toggle button.\n   */\n  button?: {\n    /** Additional CSS classes for the toggle button */\n    classes?: ResolvableString\n  }\n}\n\n/**\n * GOV.UK Password Input component.\n * A password input component with a show/hide toggle following the GOV.UK Design System patterns.\n *\n * The password input component allows users to enter a password with a toggle button\n * to show or hide the password text. This helps users check they have typed their\n * password correctly, particularly on mobile devices.\n *\n * @see https://design-system.service.gov.uk/components/password-input/\n * @example\n * ```typescript\n * GovUKPasswordInput({\n *   code: 'password',\n *   label: 'Password',\n *   hint: 'Your password must be at least 8 characters',\n *   autocomplete: 'current-password',\n * })\n * ```\n * @example\n * ```typescript\n * // For new password creation (e.g., registration)\n * GovUKPasswordInput({\n *   code: 'new-password',\n *   label: { text: 'Create a password', isPageHeading: true },\n *   hint: 'Your password must contain at least 8 characters, a number, and a special character',\n *   autocomplete: 'new-password',\n * })\n * ```\n */\nexport const GovUKPasswordInput = nunjucksComponent<GovUKPasswordInput>('govukPasswordInput', {\n  field: true,\n  inputSchema: z.string(),\n  // The rendered input's id matches the render params below, so error summary links land on it.\n  errorAnchor: props => props.id ?? props.code,\n  render: (props, nunjucksEnv) => {\n    const params = {\n      id: props.id ?? props.code,\n      name: props.code,\n      label: normaliseGovukTextParam(props.label),\n      hint: normaliseGovukTextParam(props.hint),\n      value: props.value,\n      disabled: props.disabled,\n      autocomplete: props.autocomplete,\n      describedBy: props.describedBy,\n      formGroup: props.formGroup,\n      classes: props.classes,\n      attributes: props.attributes,\n      showPasswordText: props.showPasswordText,\n      hidePasswordText: props.hidePasswordText,\n      showPasswordAriaLabelText: props.showPasswordAriaLabelText,\n      hidePasswordAriaLabelText: props.hidePasswordAriaLabelText,\n      passwordShownAnnouncementText: props.passwordShownAnnouncementText,\n      passwordHiddenAnnouncementText: props.passwordHiddenAnnouncementText,\n      button: props.button,\n      errorMessage: normaliseGovukErrorMessage(props.errors),\n    }\n\n    return nunjucksEnv.render('govuk/components/password-input/template.njk', {\n      params,\n    })\n  },\n})\n","import { z } from 'zod'\nimport {\n  FieldBlockDefinition,\n  ResolvableArray,\n  ResolvableBoolean,\n  ResolvableString,\n} from '@ministryofjustice/hmpps-forge/core/components'\nimport { nunjucksComponent } from '../../utils/nunjucksComponent'\nimport { normaliseGovukErrorMessage, normaliseGovukTextParam } from '../../utils/govukParamNormalisers'\n\n/**\n * Select item configuration\n */\nexport interface SelectItem {\n  /** Value for the option. If omitted, the value is taken from the text content. */\n  value?: ResolvableString\n  /** Text for the option item. */\n  text: ResolvableString\n  /** Whether the option should be selected when the page loads. */\n  selected?: ResolvableBoolean\n  /** Sets the option item as disabled. */\n  disabled?: ResolvableBoolean\n  /** HTML attributes to add to the option. */\n  attributes?: Record<string, any>\n  /** Conditional visibility for this option. */\n  visibleWhen?: ResolvableBoolean\n}\n\n/**\n * GOV.UK Select Input component.\n *\n * @see https://design-system.service.gov.uk/components/select/\n * @example\n * ```typescript\n * GovUKSelectInput({\n *   code: 'country',\n *   label: 'Select your country',\n *   items: [\n *     { value: '', text: 'Choose an option' },\n *     { value: 'gb', text: 'United Kingdom' },\n *     { value: 'fr', text: 'France' },\n *   ],\n * })\n * ```\n */\nexport interface GovUKSelectInput extends FieldBlockDefinition {\n  /**\n   * The ID of the select. Defaults to the value of `code` if not provided.\n   * @example 'country-select'\n   */\n  id?: ResolvableString\n\n  /**\n   * The items within the select component.\n   * Each item represents an option in the dropdown.\n   *\n   * @example [{ value: '', text: 'Choose an option' }, { value: 'uk', text: 'United Kingdom' }]\n   */\n  items: ResolvableArray<SelectItem>\n\n  /**\n   * The label used by the select component.\n   * Can be a simple string or a complex object with additional properties.\n   *\n   * @example 'Select your country'\n   * @example { text: 'Country', classes: 'govuk-label--l' }\n   */\n  label:\n    | ResolvableString\n    | {\n        /** Text content of the label */\n        text?: ResolvableString\n        /** HTML content of the label (takes precedence over text) */\n        html?: ResolvableString\n        /** Additional CSS classes for the label */\n        classes?: ResolvableString\n        /** For attribute - automatically set if not provided */\n        for?: ResolvableString\n        /** Whether to render the label as a page heading (wrapped in h1) */\n        isPageHeading?: ResolvableBoolean\n        /** Additional HTML attributes for the label */\n        attributes?: Record<string, any>\n      }\n\n  /**\n   * Can be used to add a hint to the select component.\n   * Provides additional context or instructions for the user.\n   *\n   * @example 'Select the country where you currently live'\n   */\n  hint?:\n    | ResolvableString\n    | {\n        /** Text content of the hint */\n        text?: ResolvableString\n        /** HTML content of the hint (takes precedence over text) */\n        html?: ResolvableString\n        /** Additional CSS classes for the hint */\n        classes?: ResolvableString\n        /** Unique ID for the hint (auto-generated if not provided) */\n        id?: ResolvableString\n        /** Additional HTML attributes for the hint */\n        attributes?: Record<string, any>\n      }\n\n  /**\n   * If `true`, select box will be disabled.\n   * Use the `disabled` option on each individual item to only disable certain options.\n   * @example true\n   */\n  disabled?: ResolvableBoolean\n\n  /**\n   * One or more element IDs to add to the `aria-describedby` attribute.\n   * Used to provide additional descriptive information for screenreader users.\n   *\n   * @example 'country-select-help'\n   */\n  describedBy?: ResolvableString\n\n  /**\n   * Additional options for the form group containing the select component.\n   */\n  formGroup?: {\n    /** Classes to add to the form group wrapper. */\n    classes?: ResolvableString\n    /** HTML attributes to add to the form group wrapper */\n    attributes?: Record<string, any>\n    /** Content to add before the select element. */\n    beforeInput?: {\n      /** Text content to add before the select */\n      text?: ResolvableString\n      /** HTML content to add before the select (takes precedence over text) */\n      html?: ResolvableString\n    }\n    /** Content to add after the select element. */\n    afterInput?: {\n      /** Text content to add after the select */\n      text?: ResolvableString\n      /** HTML content to add after the select (takes precedence over text) */\n      html?: ResolvableString\n    }\n  }\n\n  /**\n   * Additional CSS classes to add to the select element.\n   * @example 'govuk-!-width-one-half'\n   */\n  classes?: ResolvableString\n\n  /**\n   * Additional HTML attributes to add to the select element.\n   * @example { 'data-module': 'accessible-autocomplete' }\n   */\n  attributes?: Record<string, any>\n}\n\n/**\n * GOV.UK Select Input component.\n *\n * @see https://design-system.service.gov.uk/components/select/\n * @example\n * ```typescript\n * GovUKSelectInput({\n *   code: 'country',\n *   label: 'Select your country',\n *   items: [\n *     { value: '', text: 'Choose an option' },\n *     { value: 'gb', text: 'United Kingdom' },\n *     { value: 'fr', text: 'France' },\n *   ],\n * })\n * ```\n */\nexport const GovUKSelectInput = nunjucksComponent<GovUKSelectInput>('govukSelectInput', {\n  field: true,\n  inputSchema: z.string(),\n  // The rendered select's id matches the render params below, so error summary links land on it.\n  errorAnchor: props => props.id ?? props.code,\n  render: (props, nunjucksEnv) => {\n    const params = {\n      id: props.id ?? props.code,\n      name: props.code,\n      items: props.items.filter(item => item.visibleWhen !== false),\n      label: normaliseGovukTextParam(props.label),\n      hint: normaliseGovukTextParam(props.hint),\n      value: props.value,\n      disabled: props.disabled,\n      describedBy: props.describedBy,\n      formGroup: props.formGroup,\n      classes: props.classes,\n      attributes: props.attributes,\n      errorMessage: normaliseGovukErrorMessage(props.errors),\n    }\n\n    return nunjucksEnv.render('govuk/components/select/template.njk', {\n      params,\n    })\n  },\n})\n","import { z } from 'zod'\nimport {\n  BlockDefinition,\n  ResolvableArray,\n  ResolvableBoolean,\n  ResolvableString,\n  EvaluatedBlock,\n  FieldBlockDefinition,\n} from '@ministryofjustice/hmpps-forge/core/components'\nimport { nunjucksComponent } from '../../utils/nunjucksComponent'\nimport {\n  normaliseGovukErrorMessage,\n  normaliseGovukFieldset,\n  normaliseGovukTextParam,\n  renderGovukBlocksToHtml,\n  type GovukRenderedBlockContent,\n} from '../../utils/govukParamNormalisers'\n\n/**\n * GOV.UK Radio Input component.\n * Allows users to select a single option from a list of mutually exclusive choices.\n *\n * @see https://design-system.service.gov.uk/components/radios/\n * @example\n * ```typescript\n * GovUKRadioInput({\n *   code: 'contact_method',\n *   label: 'How would you like to be contacted?',\n *   items: [\n *     { value: 'email', text: 'Email' },\n *     { value: 'phone', text: 'Phone' },\n *     { value: 'text', text: 'Text message' },\n *   ],\n * })\n * ```\n */\nexport interface GovUKRadioInput extends FieldBlockDefinition {\n  /**\n   * The label for the radio group.\n   * When using fieldset, this becomes the legend text if no fieldset legend is specified.\n   * @example 'How would you like to be contacted?'\n   */\n  label?: ResolvableString\n\n  /**\n   * Can be used to add a fieldset to the radios component.\n   * Provides semantic grouping and accessibility benefits for multiple related inputs.\n   */\n  fieldset?: {\n    /**\n     * Legend for the fieldset - describes the group of radio options.\n     * If not provided, falls back to the `label` property.\n     */\n    legend?: {\n      /** Text content of the legend */\n      text?: ResolvableString\n      /** HTML content of the legend (takes precedence over text) */\n      html?: ResolvableString\n      /** Additional CSS classes for the legend */\n      classes?: ResolvableString\n      /** Whether to render the legend as a page heading (wrapped in h1) */\n      isPageHeading?: ResolvableBoolean\n    }\n    /** Additional CSS classes for the fieldset wrapper */\n    classes?: ResolvableString\n    /** HTML attributes to add to the fieldset */\n    attributes?: Record<string, any>\n    /** Element IDs to add to the fieldset's aria-describedby attribute */\n    describedBy?: ResolvableString\n  }\n\n  /**\n   * Can be used to add a hint to the radios component.\n   * Provides additional context or instructions for the radio group.\n   *\n   * @example 'Select all that apply' // Simple hint\n   * @example { html: 'Choose the <strong>most appropriate</strong> option' } // Rich HTML hint\n   */\n  hint?:\n    | ResolvableString\n    | {\n        /** Unique ID for the hint (auto-generated if not provided) */\n        id?: ResolvableString\n        /** Text content of the hint */\n        text?: ResolvableString\n        /** HTML content of the hint (takes precedence over text) */\n        html?: ResolvableString\n        /** Additional CSS classes for the hint */\n        classes?: ResolvableString\n        /** Additional HTML attributes for the hint */\n        attributes?: Record<string, any>\n      }\n\n  /**\n   * Additional options for the form group containing the radios component.\n   * Allows customization of the wrapper element and additional content.\n   */\n  formGroup?: {\n    /**\n     * Classes to add to the form group wrapper.\n     * Useful for custom styling or indicating error states.\n     */\n    classes?: ResolvableString\n    /** HTML attributes to add to the form group wrapper */\n    attributes?: Record<string, any>\n    /**\n     * Content to add before all radio items within the radios component.\n     * Useful for additional instructions or context.\n     */\n    beforeInputs?: {\n      /** Text content to add before all radio items */\n      text?: ResolvableString\n      /** HTML content to add before all radio items (takes precedence over text) */\n      html?: ResolvableString\n      /** Additional CSS classes for the before inputs content */\n      classes?: ResolvableString\n    }\n    /**\n     * Content to add after all radio items within the radios component.\n     * Useful for additional information or related actions.\n     */\n    afterInputs?: {\n      /** Text content to add after all radio items */\n      text?: ResolvableString\n      /** HTML content to add after all radio items (takes precedence over text) */\n      html?: ResolvableString\n      /** Additional CSS classes for the after inputs content */\n      classes?: ResolvableString\n    }\n  }\n\n  /**\n   * Optional prefix. This is used to prefix the `id` attribute for each radio input,\n   * hint and error message, separated by `-`. Defaults to the `code` value.\n   * @example 'contact-method' // Creates IDs like 'contact-method-email', 'contact-method-phone'\n   */\n  idPrefix?: ResolvableString\n\n  /**\n   * Additional CSS classes to add to the radio container.\n   * @example 'govuk-radios--inline' // Display radios horizontally\n   * @example 'govuk-radios--small' // Smaller radio buttons\n   */\n  classes?: ResolvableString\n\n  /**\n   * Additional HTML attributes (such as data attributes) to add to the radio input tag.\n   * @example { 'data-module': 'govuk-radios' }\n   */\n  attributes?: Record<string, any>\n\n  /**\n   * The radio items within the radios component.\n   * Can include both radio options and dividers for visual separation.\n   * Can also be an expression for dynamic items using the Iterator pattern.\n   *\n   * @example [\n   *   { value: 'yes', text: 'Yes' },\n   *   { value: 'no', text: 'No' },\n   *   { divider: 'or' },\n   *   { value: 'maybe', text: 'Not sure' }\n   * ]\n   *\n   * @example\n   * // Dynamic items using Iterator\n   * Data('areas').each(Iterator.Map({ value: Item().path('value'), text: Item().path('text') }))\n   */\n  items: ResolvableArray<GovUKRadioInputItem | GovUKRadioInputDivider>\n}\n\n/**\n * Individual radio option within a radio group.\n * Represents a single selectable choice with optional conditional reveals.\n */\nexport interface GovUKRadioInputItem {\n  /**\n   * Value for the radio input. This is submitted with the form data when selected.\n   * @example 'email'\n   * @example 'phone'\n   */\n  value: ResolvableString\n\n  /**\n   * Text to use within the radio item label.\n   * If `html` is provided, this will be ignored.\n   * @example 'Email'\n   */\n  text?: ResolvableString\n\n  /**\n   * HTML to use within the radio item label.\n   * Takes precedence over `text` if both are provided.\n   * @example 'Email <span class=\"govuk-caption-m\">Fastest response</span>'\n   */\n  html?: ResolvableString\n\n  /**\n   * Specific ID attribute for the radio item.\n   * If omitted, then `idPrefix` string will be applied with the value.\n   * @example 'contact-email'\n   */\n  id?: ResolvableString\n\n  /**\n   * Can be used to add a hint to each radio item within the radios component.\n   * Provides additional context for individual options.\n   * @example 'We'll send updates to this email address'\n   */\n  hint?:\n    | ResolvableString\n    | {\n        /** Unique ID for the hint (auto-generated if not provided) */\n        id?: ResolvableString\n        /** Text content of the hint */\n        text?: ResolvableString\n        /** HTML content of the hint (takes precedence over text) */\n        html?: ResolvableString\n        /** Additional CSS classes for the hint */\n        classes?: ResolvableString\n        /** Additional HTML attributes for the hint */\n        attributes?: Record<string, any>\n      }\n\n  /**\n   * Whether the radio should be checked when the page loads.\n   * Takes precedence over the top-level `value` option.\n   * @example true // Pre-select this option\n   */\n  checked?: ResolvableBoolean\n\n  /**\n   * If `true`, radio will be disabled and cannot be selected.\n   * @example true // Disable this option\n   */\n  disabled?: ResolvableBoolean\n\n  /**\n   * Additional HTML attributes (such as data attributes) to add to the radio input tag.\n   * @example { 'data-aria-controls': 'conditional-content' }\n   */\n  attributes?: Record<string, any>\n\n  /**\n   * Provide additional content to reveal when the radio is checked.\n   * Useful for collecting additional information when specific options are selected.\n   * @example someConditionalField // A field definition that appears when this radio is selected\n   */\n  block?: BlockDefinition | BlockDefinition[]\n\n  /** Conditional visibility for this radio item */\n  visibleWhen?: ResolvableBoolean\n}\n\n/**\n * Divider element to separate radio options visually.\n * Useful for grouping related options or providing \"or\" separators.\n */\nexport interface GovUKRadioInputDivider {\n  /**\n   * Divider text to separate radio items.\n   * @example 'or'\n   * @example 'Alternative options'\n   */\n  divider: ResolvableString\n\n  /** Conditional visibility for this divider */\n  visibleWhen?: ResolvableBoolean\n}\n\n/**\n * GOV.UK Radio Input component.\n * Allows users to select a single option from a list of mutually exclusive choices.\n *\n * @see https://design-system.service.gov.uk/components/radios/\n * @example\n * ```typescript\n * GovUKRadioInput({\n *   code: 'contact_method',\n *   label: 'How would you like to be contacted?',\n *   items: [\n *     { value: 'email', text: 'Email' },\n *     { value: 'phone', text: 'Phone' },\n *     { value: 'text', text: 'Text message' },\n *   ],\n * })\n * ```\n */\nexport const GovUKRadioInput = nunjucksComponent<GovUKRadioInput>('govukRadioInput', {\n  field: true,\n  inputSchema: z.string(),\n  // The first rendered radio's id is the idPrefix, so error summary links land there.\n  errorAnchor: props => props.idPrefix || props.code,\n  render: (props, nunjucksEnv) => {\n    const items = props.items\n      .filter(option => option.visibleWhen !== false)\n      .map(option => makeOption(option, props.value as string))\n\n    const params = {\n      fieldset: normaliseGovukFieldset(props.fieldset, props.label),\n      idPrefix: props.idPrefix || props.code,\n      name: props.code,\n      value: props.value,\n      formGroup: props.formGroup,\n      hint: normaliseGovukTextParam(props.hint),\n      items,\n      classes: props.classes,\n      attributes: props.attributes,\n      errorMessage: normaliseGovukErrorMessage(props.errors),\n    }\n\n    return nunjucksEnv.render('govuk/components/radios/template.njk', {\n      params,\n    })\n  },\n})\n\nconst getConditionalContent = (block: GovukRenderedBlockContent) => {\n  const html = renderGovukBlocksToHtml(block)\n\n  if (html === undefined) {\n    return undefined\n  }\n\n  return { html }\n}\n\nconst makeOption = (option: EvaluatedBlock<GovUKRadioInputItem | GovUKRadioInputDivider>, checkedValue: string) => {\n  if (isRadioDivider(option)) {\n    return {\n      divider: option.divider,\n    }\n  }\n\n  return {\n    value: option.value,\n    text: option.text,\n    html: option.html,\n    id: option.id,\n    hint: normaliseGovukTextParam(option.hint),\n    checked: option.checked ?? checkedValue === option.value,\n    conditional: getConditionalContent(option.block),\n    disabled: option.disabled,\n    attributes: option.attributes,\n  }\n}\n\n// Narrow to Divider\nfunction isRadioDivider(\n  option: EvaluatedBlock<GovUKRadioInputItem | GovUKRadioInputDivider>,\n): option is EvaluatedBlock<GovUKRadioInputDivider>\nfunction isRadioDivider(option: any): option is GovUKRadioInputDivider {\n  return option != null && typeof option === 'object' && 'divider' in option && !('value' in option) // prefer Divider if both accidentally exist\n}\n","import { z } from 'zod'\nimport {\n  BlockDefinition,\n  ResolvableArray,\n  ResolvableBoolean,\n  ResolvableString,\n  EvaluatedBlock,\n  FieldBlockDefinition,\n} from '@ministryofjustice/hmpps-forge/core/components'\nimport { nunjucksComponent } from '../../utils/nunjucksComponent'\nimport {\n  normaliseGovukErrorMessage,\n  normaliseGovukFieldset,\n  normaliseGovukTextParam,\n  renderGovukBlocksToHtml,\n  type GovukRenderedBlockContent,\n} from '../../utils/govukParamNormalisers'\n\n/**\n * GOV.UK Checkbox Input component.\n * Allows users to select multiple options from a list of choices.\n *\n * @see https://design-system.service.gov.uk/components/checkboxes/\n * @example\n * ```typescript\n * GovUKCheckboxInput({\n *   code: 'contact_methods',\n *   label: 'How would you like to be contacted?',\n *   hint: 'Select all that apply',\n *   items: [\n *     { value: 'email', text: 'Email' },\n *     { value: 'phone', text: 'Phone' },\n *     { value: 'text', text: 'Text message' },\n *   ],\n * })\n * ```\n */\nexport interface GovUKCheckboxInput extends FieldBlockDefinition {\n  /**\n   * The label for the checkbox group.\n   * When using fieldset, this becomes the legend text if no fieldset legend is specified.\n   *\n   * @example 'Which countries have you visited?'\n   */\n  label?: ResolvableString\n\n  /** Can be used to add a fieldset to the checkboxes component. */\n  fieldset?: {\n    /**\n     * Legend for the fieldset - describes the group of checkbox options.\n     * If not provided, falls back to the `label` property.\n     */\n    legend?: {\n      /** Text content of the legend */\n      text?: ResolvableString\n\n      /** HTML content of the legend (takes precedence over text) */\n      html?: ResolvableString\n\n      /** Additional CSS classes for the legend */\n      classes?: ResolvableString\n\n      /** Whether to render the legend as a page heading (wrapped in h1) */\n      isPageHeading?: ResolvableBoolean\n    }\n\n    /** Additional CSS classes for the fieldset wrapper */\n    classes?: ResolvableString\n\n    /** HTML attributes to add to the fieldset */\n    attributes?: Record<string, any>\n\n    /** Element IDs to add to the fieldset's aria-describedby attribute */\n    describedBy?: ResolvableString\n  }\n\n  /**\n   * Can be used to add a hint to the checkboxes component.\n   * Provides additional context or instructions for the checkbox group.\n   *\n   * @example 'Select all that apply' // Simple hint\n   * @example { html: 'Choose <strong>all relevant</strong> options' } // Rich HTML hint\n   */\n  hint?:\n    | ResolvableString\n    | {\n        /** Unique ID for the hint (auto-generated if not provided) */\n        id?: ResolvableString\n\n        /** Text content of the hint */\n        text?: ResolvableString\n\n        /** HTML content of the hint (takes precedence over text) */\n        html?: ResolvableString\n\n        /** Additional CSS classes for the hint */\n        classes?: ResolvableString\n\n        /** Additional HTML attributes for the hint */\n        attributes?: Record<string, any>\n      }\n\n  /** Additional options for the form group containing the checkboxes component. */\n  formGroup?: {\n    /** Classes to add to the form group wrapper. */\n    classes?: ResolvableString\n\n    /** HTML attributes to add to the form group wrapper */\n    attributes?: Record<string, any>\n\n    /** Content to add before all checkbox items within the checkboxes component. */\n    beforeInputs?: {\n      /** Text content to add before all checkbox items */\n      text?: ResolvableString\n      /** HTML content to add before all checkbox items (takes precedence over text) */\n      html?: ResolvableString\n      /** Additional CSS classes for the before inputs content */\n      classes?: ResolvableString\n    }\n\n    /** Content to add after all checkbox items within the checkboxes component. */\n    afterInputs?: {\n      /** Text content to add after all checkbox items */\n      text?: ResolvableString\n\n      /** HTML content to add after all checkbox items (takes precedence over text) */\n      html?: ResolvableString\n\n      /** Additional CSS classes for the after inputs content */\n      classes?: ResolvableString\n    }\n  }\n\n  /**\n   * Optional prefix. This is used to prefix the `id` attribute for each checkbox item input,\n   * hint and error message, separated by `-`. Defaults to the `code` value.\n   *\n   * @example 'contact-methods' // Creates IDs like 'contact-methods-email', 'contact-methods-phone'\n   */\n  idPrefix?: ResolvableString\n\n  /**\n   * Name attribute for all checkbox items.\n   *\n   * @example 'contact_preferences' // Form submission key\n   */\n  name?: ResolvableString\n\n  /**\n   * One or more element IDs to add to the input `aria-describedby` attribute without a fieldset.\n   * Used to provide additional descriptive information for screenreader users.\n   *\n   * @example 'contact-methods-guidance'\n   */\n  describedBy?: ResolvableString\n\n  /**\n   * Additional CSS classes to add to the checkboxes container.\n   *\n   * @example 'govuk-checkboxes--small' // Smaller checkboxes\n   */\n  classes?: ResolvableString\n\n  /** Additional HTML attributes (such as data attributes) to add to the anchor tag. */\n  attributes?: Record<string, any>\n\n  /**\n   * The checkbox items within the checkboxes component.\n   * Can include both checkbox options and dividers for visual separation.\n   * Can also be an expression for dynamic items using the Iterator pattern.\n   *\n   * @example [\n   *   { value: 'email', text: 'Email' },\n   *   { value: 'phone', text: 'Phone' },\n   *   { divider: 'or' },\n   *   { value: 'none', text: 'None of the above', behaviour: 'exclusive' }\n   * ]\n   *\n   * @example\n   * // Dynamic items using Iterator\n   * Data('areas').each(Iterator.Map({ value: Item().path('value'), text: Item().path('text') }))\n   */\n  items: ResolvableArray<GovUKCheckboxInputItem | GovUKCheckboxInputDivider>\n}\n\n/**\n * Individual checkbox option within a checkbox group.\n * Represents a single selectable choice with optional conditional reveals and behaviors.\n */\nexport interface GovUKCheckboxInputItem {\n  /**\n   * Value for the checkbox input. This is submitted with the form data when selected.\n   *\n   * @example 'Dog'\n   */\n  value: ResolvableString\n\n  /**\n   * Text to use within the checkbox item label.\n   * If `html` is provided, this will be ignored.\n   *\n   * @example 'Email'\n   */\n  text?: ResolvableString\n\n  /**\n   * HTML to use within the checkbox item label.\n   * Takes precedence over `text` if both are provided.\n   *\n   * @example 'Email <span class=\"govuk-caption-m\">Fastest response</span>'\n   */\n  html?: ResolvableString\n\n  /**\n   * Specific ID attribute for the checkbox item.\n   * If omitted, then component global `idPrefix` option will be applied.\n   *\n   * @example 'contact-email'\n   */\n  id?: ResolvableString\n\n  /**\n   * Can be used to add a hint to each checkbox item within the checkboxes component.\n   * Provides additional context for individual options.\n   *\n   * @example 'We'll send updates to this email address'\n   */\n  hint?:\n    | ResolvableString\n    | {\n        /** Unique ID for the hint (auto-generated if not provided) */\n        id?: ResolvableString\n\n        /** Text content of the hint */\n        text?: ResolvableString\n\n        /** HTML content of the hint (takes precedence over text) */\n        html?: ResolvableString\n\n        /** Additional CSS classes for the hint */\n        classes?: ResolvableString\n\n        /** Additional HTML attributes for the hint */\n        attributes?: Record<string, any>\n      }\n\n  /**\n   * Whether the checkbox should be checked when the page loads.\n   * Takes precedence over the top-level `values` option.\n   *\n   * @example true // Pre-select this option\n   */\n  checked?: ResolvableBoolean\n\n  /**\n   * If `true`, checkbox will be disabled and cannot be selected.\n   *\n   * @example true // Disable this option\n   */\n  disabled?: ResolvableBoolean\n\n  /**\n   * If set to \"exclusive\", implements a 'None of these' type behavior via JavaScript.\n   * When this checkbox is selected, all other checkboxes in the group are unchecked.\n   * When any other checkbox is selected, this exclusive checkbox is unchecked.\n   *\n   * @example 'exclusive' // Typical for \"None of the above\" options\n   */\n  behaviour?: 'exclusive'\n\n  /**\n   * Additional HTML attributes (such as data attributes) to add to the checkbox input tag.\n   */\n  attributes?: Record<string, any>\n\n  /**\n   * Subset of options for the label used by each checkbox item.\n   */\n  label?: {\n    /** Additional CSS classes for the label tag */\n    classes?: ResolvableString\n\n    /** HTML attributes to add to the label tag */\n    attributes?: Record<string, any>\n  }\n\n  /**\n   * Provide additional content to reveal when the checkbox is checked.\n   * Useful for collecting additional information when specific options are selected.\n   *\n   * @example someConditionalField // A field definition that appears when this checkbox is selected\n   */\n  block?: BlockDefinition | BlockDefinition[]\n\n  /** Conditional visibility for this checkbox item */\n  visibleWhen?: ResolvableBoolean\n}\n\n/**\n * Divider element to separate checkbox options visually.\n */\nexport interface GovUKCheckboxInputDivider {\n  /**\n   * Divider text to separate checkbox items.\n   *\n   * @example 'or'\n   */\n  divider: ResolvableString\n\n  /** Conditional visibility for this divider */\n  visibleWhen?: ResolvableBoolean\n}\n\n/**\n * GOV.UK Checkbox Input component.\n * Allows users to select multiple options from a list of choices.\n *\n * @see https://design-system.service.gov.uk/components/checkboxes/\n * @example\n * ```typescript\n * GovUKCheckboxInput({\n *   code: 'contact_methods',\n *   label: 'How would you like to be contacted?',\n *   hint: 'Select all that apply',\n *   items: [\n *     { value: 'email', text: 'Email' },\n *     { value: 'phone', text: 'Phone' },\n *     { value: 'text', text: 'Text message' },\n *   ],\n * })\n * ```\n */\nexport const GovUKCheckboxInput = nunjucksComponent<GovUKCheckboxInput>('govukCheckboxInput', {\n  field: true,\n  inputSchema: z.array(z.string()),\n  multiple: true,\n  // The first rendered checkbox's id is the idPrefix, so error summary links land there.\n  errorAnchor: props => props.idPrefix || props.code,\n  render: (props, nunjucksEnv) => {\n    // At render time, items has been evaluated (Collection expressions resolved to arrays)\n    const evaluatedItems = props.items as EvaluatedBlock<GovUKCheckboxInputItem | GovUKCheckboxInputDivider>[]\n    const items = evaluatedItems\n      .filter(option => option.visibleWhen !== false)\n      .map(option => makeOption(option, props.value))\n\n    const params = {\n      fieldset: normaliseGovukFieldset(props.fieldset, props.label),\n      idPrefix: props.idPrefix || props.code,\n      name: props.name || props.code,\n      describedBy: props.describedBy,\n      formGroup: props.formGroup,\n      hint: normaliseGovukTextParam(props.hint),\n      items,\n      classes: props.classes,\n      attributes: props.attributes,\n      errorMessage: normaliseGovukErrorMessage(props.errors),\n    }\n\n    return nunjucksEnv.render('govuk/components/checkboxes/template.njk', {\n      params,\n    })\n  },\n})\n\nconst getConditionalContent = (block: GovukRenderedBlockContent) => {\n  const html = renderGovukBlocksToHtml(block)\n\n  if (html === undefined) {\n    return undefined\n  }\n\n  return { html }\n}\n\nconst makeOption = (option: EvaluatedBlock<GovUKCheckboxInputItem | GovUKCheckboxInputDivider>, blockValue?: any) => {\n  if (isCheckboxDivider(option)) {\n    return {\n      divider: option.divider,\n    }\n  }\n\n  // For checkboxes, check if the option value is in the array of values\n  let isChecked = false\n  if (option.checked !== undefined) {\n    isChecked = Boolean(option.checked)\n  } else if (Array.isArray(blockValue)) {\n    isChecked = blockValue.includes(option.value)\n  }\n\n  return {\n    value: option.value,\n    text: option.text,\n    html: option.html,\n    id: option.id,\n    hint: normaliseGovukTextParam(option.hint),\n    checked: isChecked,\n    conditional: getConditionalContent(option.block),\n    disabled: option.disabled,\n    behaviour: option.behaviour,\n    attributes: option.attributes,\n    label: option.label,\n  }\n}\n\n// Narrow to Divider\nfunction isCheckboxDivider(\n  option: EvaluatedBlock<GovUKCheckboxInputItem | GovUKCheckboxInputDivider>,\n): option is EvaluatedBlock<GovUKCheckboxInputDivider>\nfunction isCheckboxDivider(option: any): option is GovUKCheckboxInputDivider {\n  return option != null && typeof option === 'object' && 'divider' in option && !('value' in option) // prefer Divider if both accidentally exist\n}\n","import { z } from 'zod'\nimport {\n  FieldBlockDefinition,\n  ResolvableBoolean,\n  ResolvableNumber,\n  ResolvableString,\n} from '@ministryofjustice/hmpps-forge/core/components'\nimport { nunjucksComponent } from '../../utils/nunjucksComponent'\nimport { normaliseGovukErrorMessage, normaliseGovukTextParam } from '../../utils/govukParamNormalisers'\n\n/**\n * GOV.UK Textarea component.\n * A multi-line text input field.\n *\n * @see https://design-system.service.gov.uk/components/textarea/\n * @example\n * ```typescript\n * GovUKTextareaInput({\n *   code: 'comments',\n *   label: 'Please provide any additional comments',\n *   hint: 'Include as much detail as possible',\n *   rows: '8',\n * })\n * ```\n */\nexport interface GovUKTextareaInput extends FieldBlockDefinition {\n  /**\n   * The ID of the textarea. Defaults to the value of `code` if not provided.\n   *\n   * @example 'user-feedback'\n   */\n  id?: ResolvableString\n\n  /**\n   * Optional field to enable or disable the `spellcheck` attribute on the textarea.\n   * When not specified, browsers will use their default behavior.\n   *\n   * @example true // Enable spellcheck\n   */\n  spellcheck?: ResolvableBoolean\n\n  /**\n   * Optional number of textarea rows. Defaults to 5 rows if not specified.\n   * Controls the initial height of the textarea.\n   *\n   * @example 8 // Taller textarea\n   * @example 3 // Shorter textarea\n   */\n  rows?: ResolvableNumber | ResolvableString\n\n  /**\n   * The label used by the textarea component.\n   * Can be a simple string or a complex object with additional properties.\n   *\n   * @example 'Your comments' // Simple string label\n   * @example { text: 'Feedback', classes: 'govuk-label--l' } // Object with styling\n   */\n  label?:\n    | ResolvableString\n    | {\n        /** Text content of the label */\n        text?: ResolvableString\n\n        /** HTML content of the label (takes precedence over text) */\n        html?: ResolvableString\n\n        /** Additional CSS classes for the label */\n        classes?: ResolvableString\n\n        /** Whether to render the label as a page heading (wrapped in h1) */\n        isPageHeading?: ResolvableBoolean\n\n        /** Additional HTML attributes for the label */\n        attributes?: Record<string, any>\n      }\n\n  /**\n   * Can be used to add a hint to the textarea component.\n   * Provides additional context or instructions for the user.\n   *\n   * @example 'Include as much detail as possible' // Simple string hint\n   * @example { html: 'See <a href=\"/help\">guidance</a> for examples' } // Rich HTML hint\n   */\n  hint?:\n    | ResolvableString\n    | {\n        /** Unique ID for the hint (auto-generated if not provided) */\n        id?: ResolvableString\n\n        /** Text content of the hint */\n        text?: ResolvableString\n\n        /** HTML content of the hint (takes precedence over text) */\n        html?: ResolvableString\n\n        /** Additional CSS classes for the hint */\n        classes?: ResolvableString\n\n        /** Additional HTML attributes for the hint */\n        attributes?: Record<string, any>\n      }\n\n  /** Additional options for the form group containing the textarea component. */\n  formGroup?: {\n    /** Classes to add to the form group wrapper. */\n    classes?: ResolvableString\n\n    /** HTML attributes to add to the form group wrapper */\n    attributes?: Record<string, any>\n\n    /** Content to add before the textarea input */\n    beforeInput?: {\n      /** Text content to add before the textarea */\n      text?: ResolvableString\n\n      /** HTML content to add before the textarea (takes precedence over text) */\n      html?: ResolvableString\n    }\n\n    /** Content to add after the textarea input. */\n    afterInput?: {\n      /** Text content to add after the textarea */\n      text?: ResolvableString\n\n      /** HTML content to add after the textarea (takes precedence over text) */\n      html?: ResolvableString\n    }\n  }\n\n  /** Additional CSS classes to add to the textarea element */\n  classes?: ResolvableString\n\n  /**\n   * If `true`, textarea will be disabled and cannot be edited by the user.\n   *\n   * @example true // Disable the textarea\n   */\n  disabled?: ResolvableBoolean\n\n  /**\n   * Attribute to meet WCAG success criterion 1.3.5: Identify input purpose.\n   * Helps browsers provide appropriate autofill suggestions.\n   *\n   * @see https://www.w3.org/WAI/WCAG22/Understanding/identify-input-purpose.html\n   * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill\n   * @example 'street-address' // For address fields\n   * @example 'off' // Disable autocomplete\n   */\n  autocomplete?: ResolvableString\n\n  /**\n   * One or more element IDs to add to the `aria-describedby` attribute.\n   * Used to provide additional descriptive information for screenreader users.\n   *\n   * @example 'comments-guidance'\n   */\n  describedBy?: ResolvableString\n\n  /** Additional HTML attributes (such as data attributes) to add to the textarea element. */\n  attributes?: Record<string, any>\n}\n\n/**\n * GOV.UK Textarea component.\n * A multi-line text input field.\n *\n * @see https://design-system.service.gov.uk/components/textarea/\n * @example\n * ```typescript\n * GovUKTextareaInput({\n *   code: 'comments',\n *   label: 'Please provide any additional comments',\n *   hint: 'Include as much detail as possible',\n *   rows: '8',\n * })\n * ```\n */\nexport const GovUKTextareaInput = nunjucksComponent<GovUKTextareaInput>('govukTextarea', {\n  field: true,\n  inputSchema: z.string(),\n  // The rendered textarea's id matches the render params below, so error summary links land on it.\n  errorAnchor: props => props.id ?? props.code,\n  render: (props, nunjucksEnv) => {\n    const params = {\n      id: props.id ?? props.code,\n      name: props.code,\n      spellcheck: props.spellcheck,\n      rows: props.rows || '5',\n      value: props.value,\n      disabled: props.disabled,\n      label: normaliseGovukTextParam(props.label),\n      hint: normaliseGovukTextParam(props.hint),\n      errorMessage: normaliseGovukErrorMessage(props.errors),\n      formGroup: props.formGroup,\n      classes: props.classes,\n      autocomplete: props.autocomplete,\n      describedBy: props.describedBy,\n      attributes: props.attributes,\n    }\n\n    return nunjucksEnv.render('govuk/components/textarea/template.njk', {\n      params,\n    })\n  },\n})\n","import { z } from 'zod'\nimport {\n  FieldBlockDefinition,\n  ResolvableBoolean,\n  ResolvableNumber,\n  ResolvableString,\n} from '@ministryofjustice/hmpps-forge/core/components'\nimport { nunjucksComponent } from '../../utils/nunjucksComponent'\nimport { normaliseGovukErrorMessage, normaliseGovukTextParam } from '../../utils/govukParamNormalisers'\n\n/**\n * GOV.UK Character Count component.\n * Extends textarea with live feedback about remaining characters or words.\n *\n * @see https://design-system.service.gov.uk/components/character-count/\n * @example\n * ```typescript\n * GovUKCharacterCount({\n *   code: 'feedback',\n *   label: 'Provide your feedback',\n *   hint: 'Include as much detail as possible',\n *   maxLength: 500,\n * })\n * ```\n */\nexport interface GovUKCharacterCount extends FieldBlockDefinition {\n  /**\n   * The ID of the textarea. Defaults to the value of `code` if not provided.\n   * @example 'feedback-textarea'\n   */\n  id?: ResolvableString\n\n  /**\n   * Optional number of textarea rows. Defaults to 5 rows if not specified.\n   * Controls the initial height of the textarea.\n   * @example 8 // Taller textarea\n   * @example 3 // Shorter textarea\n   */\n  rows?: ResolvableNumber | ResolvableString\n\n  /**\n   * The maximum number of characters allowed.\n   * If `maxWords` is provided, this option will be ignored.\n   * Either `maxLength` or `maxWords` must be specified.\n   * @example 200 // Allow up to 200 characters\n   * @example 1000 // Allow up to 1000 characters\n   */\n  maxLength?: ResolvableNumber\n\n  /**\n   * The maximum number of words allowed.\n   * If provided, this takes precedence over `maxLength`.\n   * Either `maxLength` or `maxWords` must be specified.\n   * @example 150 // Allow up to 150 words\n   * @example 500 // Allow up to 500 words\n   */\n  maxWords?: ResolvableNumber\n\n  /**\n   * The percentage value of the limit at which the count message is displayed.\n   * If set, the count message will be hidden until this threshold is reached.\n   * @example '75' // Show count when 75% of limit is reached\n   * @example '90' // Show count when 90% of limit is reached\n   */\n  threshold?: ResolvableString\n\n  /**\n   * The label used by the character count component.\n   * Can be a simple string or a complex object with additional properties.\n   * @example 'Describe the issue' // Simple string label\n   * @example { text: 'Feedback', classes: 'govuk-label--l' } // Object with styling\n   */\n  label:\n    | ResolvableString\n    | {\n        /** Text content of the label */\n        text?: ResolvableString\n        /** HTML content of the label (takes precedence over text) */\n        html?: ResolvableString\n        /** Additional CSS classes for the label */\n        classes?: ResolvableString\n        /** Whether to render the label as a page heading (wrapped in h1) */\n        isPageHeading?: ResolvableBoolean\n        /** Additional HTML attributes for the label */\n        attributes?: Record<string, any>\n      }\n\n  /**\n   * Can be used to add a hint to the character count component.\n   * Provides additional context or instructions for the user.\n   * @example 'Include as much detail as possible' // Simple string hint\n   * @example { html: 'See <a href=\"/help\">guidance</a> for examples' } // Rich HTML hint\n   */\n  hint?:\n    | ResolvableString\n    | {\n        /** Unique ID for the hint (auto-generated if not provided) */\n        id?: ResolvableString\n        /** Text content of the hint */\n        text?: ResolvableString\n        /** HTML content of the hint (takes precedence over text) */\n        html?: ResolvableString\n        /** Additional CSS classes for the hint */\n        classes?: ResolvableString\n        /** Additional HTML attributes for the hint */\n        attributes?: Record<string, any>\n      }\n\n  /** Additional options for the form group containing the character count component. */\n  formGroup?: {\n    /** Classes to add to the form group wrapper. */\n    classes?: ResolvableString\n    /** HTML attributes to add to the form group wrapper */\n    attributes?: Record<string, any>\n    /** Content to add before the textarea input */\n    beforeInput?: {\n      /** Text content to add before the textarea */\n      text?: ResolvableString\n      /** HTML content to add before the textarea (takes precedence over text) */\n      html?: ResolvableString\n    }\n    /** Content to add after the textarea input (in addition to count message). */\n    afterInput?: {\n      /** Text content to add after the textarea */\n      text?: ResolvableString\n      /** HTML content to add after the textarea (takes precedence over text) */\n      html?: ResolvableString\n    }\n  }\n\n  /** Additional CSS classes to add to the textarea element */\n  classes?: ResolvableString\n\n  /** Additional HTML attributes (such as data attributes) to add to the textarea element. */\n  attributes?: Record<string, any>\n\n  /**\n   * Optional field to enable or disable the `spellcheck` attribute on the textarea.\n   * When not specified, browsers will use their default behavior.\n   * @example true // Enable spellcheck\n   * @example false // Disable spellcheck\n   */\n  spellcheck?: ResolvableBoolean\n\n  /** Additional options for the count message displayed below the textarea. */\n  countMessage?: {\n    /** Additional CSS classes for the count message */\n    classes?: ResolvableString\n  }\n\n  /**\n   * Message made available to assistive technologies to describe that the component\n   * accepts only a limited amount of content. Visible when JavaScript is unavailable.\n   * The component will replace the `%{count}` placeholder with the maxLength or maxWords value.\n   * @example 'You can enter up to %{count} characters'\n   * @example 'Please limit your response to %{count} words'\n   */\n  textareaDescriptionText?: ResolvableString\n\n  /**\n   * Message displayed when the number of characters is under the configured maximum.\n   * The component will replace the `%{count}` placeholder with the number of remaining characters.\n   * Supports pluralization rules for different languages.\n   * @example { one: 'You have %{count} character remaining', other: 'You have %{count} characters remaining' }\n   */\n  charactersUnderLimitText?: {\n    /** Message when exactly 1 character remains */\n    one?: ResolvableString\n    /** Message when multiple characters remain */\n    other?: ResolvableString\n  }\n\n  /**\n   * Message displayed when the number of characters reaches the configured maximum.\n   * This message is displayed visually and through assistive technologies.\n   * @example 'You have reached the character limit'\n   */\n  charactersAtLimitText?: ResolvableString\n\n  /**\n   * Message displayed when the number of characters exceeds the configured maximum.\n   * The component will replace the `%{count}` placeholder with the number of characters over the limit.\n   * Supports pluralization rules for different languages.\n   * @example { one: 'You are %{count} character over the limit', other: 'You are %{count} characters over the limit' }\n   */\n  charactersOverLimitText?: {\n    /** Message when exactly 1 character over limit */\n    one?: ResolvableString\n    /** Message when multiple characters over limit */\n    other?: ResolvableString\n  }\n\n  /**\n   * Message displayed when the number of words is under the configured maximum.\n   * The component will replace the `%{count}` placeholder with the number of remaining words.\n   * Supports pluralization rules for different languages.\n   * @example { one: 'You have %{count} word remaining', other: 'You have %{count} words remaining' }\n   */\n  wordsUnderLimitText?: {\n    /** Message when exactly 1 word remains */\n    one?: ResolvableString\n    /** Message when multiple words remain */\n    other?: ResolvableString\n  }\n\n  /**\n   * Message displayed when the number of words reaches the configured maximum.\n   * This message is displayed visually and through assistive technologies.\n   * @example 'You have reached the word limit'\n   */\n  wordsAtLimitText?: ResolvableString\n\n  /**\n   * Message displayed when the number of words exceeds the configured maximum.\n   * The component will replace the `%{count}` placeholder with the number of words over the limit.\n   * Supports pluralization rules for different languages.\n   * @example { one: 'You are %{count} word over the limit', other: 'You are %{count} words over the limit' }\n   */\n  wordsOverLimitText?: {\n    /** Message when exactly 1 word over limit */\n    one?: ResolvableString\n    /** Message when multiple words over limit */\n    other?: ResolvableString\n  }\n}\n\n/**\n * GOV.UK Character Count component.\n * Extends textarea with live feedback about remaining characters or words.\n *\n * @see https://design-system.service.gov.uk/components/character-count/\n * @example\n * ```typescript\n * GovUKCharacterCount({\n *   code: 'feedback',\n *   label: 'Provide your feedback',\n *   hint: 'Include as much detail as possible',\n *   maxLength: 500,\n * })\n * ```\n */\nexport const GovUKCharacterCount = nunjucksComponent<GovUKCharacterCount>('govukCharacterCount', {\n  field: true,\n  inputSchema: z.string(),\n  // The rendered textarea's id matches the render params below, so error summary links land on it.\n  errorAnchor: props => props.id ?? props.code,\n  render: (props, nunjucksEnv) => {\n    const id = props.id ?? props.code\n\n    const params = {\n      id,\n      name: props.code,\n      rows: props.rows || '5',\n      value: props.value,\n      maxlength: props.maxWords ? undefined : props.maxLength,\n      maxwords: props.maxWords,\n      threshold: props.threshold,\n      label: normaliseGovukTextParam(props.label),\n      hint: normaliseGovukTextParam(props.hint),\n      errorMessage: normaliseGovukErrorMessage(props.errors),\n      formGroup: props.formGroup,\n      classes: props.classes,\n      attributes: props.attributes,\n      spellcheck: props.spellcheck,\n      countMessage: props.countMessage,\n      textareaDescriptionText: props.textareaDescriptionText,\n      charactersUnderLimitText: props.charactersUnderLimitText,\n      charactersAtLimitText: props.charactersAtLimitText,\n      charactersOverLimitText: props.charactersOverLimitText,\n      wordsUnderLimitText: props.wordsUnderLimitText,\n      wordsAtLimitText: props.wordsAtLimitText,\n      wordsOverLimitText: props.wordsOverLimitText,\n    }\n\n    return nunjucksEnv.render('govuk/components/character-count/template.njk', {\n      params,\n    })\n  },\n})\n","import { z } from 'zod'\nimport {\n  ResolvableBoolean,\n  ResolvableString,\n  FieldBlockDefinition,\n  ResolvedPropsOf,\n} from '@ministryofjustice/hmpps-forge/core/components'\nimport { Transformer } from '@ministryofjustice/hmpps-forge/core/authoring'\nimport { nunjucksComponent } from '../../utils/nunjucksComponent'\nimport {\n  normaliseGovukErrorMessage,\n  normaliseGovukFieldset,\n  normaliseGovukTextParam,\n} from '../../utils/govukParamNormalisers'\n\n/**\n * The props shared by every GOV.UK Date Input variant.\n */\nexport interface GovUKDateInputBase {\n  /**\n   * The label for the date input component.\n   * When using fieldset, this becomes the legend text if no fieldset legend is specified.\n   * @example 'Date of birth'\n   * @example 'When did this happen?'\n   */\n  label?: ResolvableString\n\n  /** Fieldset wrapper for the date input component. */\n  fieldset?: {\n    /**\n     * Legend for the fieldset - describes the group of inputs.\n     * If not provided, falls back to the `label` property.\n     */\n    legend?: {\n      /** Text content of the legend */\n      text?: ResolvableString\n\n      /** HTML content of the legend (takes precedence over text) */\n      html?: ResolvableString\n\n      /** Additional CSS classes for the legend */\n      classes?: ResolvableString\n\n      /** Whether to render the legend as a page heading (wrapped in h1) */\n      isPageHeading?: ResolvableBoolean\n    }\n\n    /** Additional CSS classes for the fieldset wrapper */\n    classes?: ResolvableString\n\n    /** HTML attributes to add to the fieldset */\n    attributes?: Record<string, any>\n\n    /** Element IDs to add to the fieldsets aria-describedby attribute */\n    describedBy?: ResolvableString\n  }\n\n  /**\n   * Hint text to provide additional guidance for the date input.\n   *\n   * @example 'For example, 31 3 1980' // Simple hint\n   * @example { html: 'Enter the date as shown on your <strong>passport</strong>' } // Rich hint\n   */\n  hint?:\n    | ResolvableString\n    | {\n        /** Unique ID for the hint (auto-generated if not provided) */\n        id?: ResolvableString\n\n        /** Text content of the hint */\n        text?: ResolvableString\n\n        /** HTML content of the hint (takes precedence over text) */\n        html?: ResolvableString\n\n        /** Additional CSS classes for the hint */\n        classes?: ResolvableString\n\n        /** Additional HTML attributes for the hint */\n        attributes?: Record<string, any>\n      }\n\n  /** Additional options for the form group containing the date input component. */\n  formGroup?: {\n    /** Classes to add to the form group wrapper. */\n    classes?: ResolvableString\n\n    /** HTML attributes to add to the form group wrapper */\n    attributes?: Record<string, any>\n\n    /** Content to add before the date inputs. */\n    beforeInputs?: {\n      /** Text content to add before the inputs */\n      text?: ResolvableString\n\n      /** HTML content to add before the inputs (takes precedence over text) */\n      html?: ResolvableString\n    }\n\n    /** Content to add after the date inputs */\n    afterInputs?: {\n      /** Text content to add after the inputs */\n      text?: ResolvableString\n\n      /** HTML content to add after the inputs (takes precedence over text) */\n      html?: ResolvableString\n    }\n  }\n\n  /**\n   * The ID for the main date input component. Defaults to `code` if not provided.\n   * Used to compose ID attributes for individual date fields (day, month, year).\n   *\n   * @example 'birthday' // Creates IDs like 'birthday-day', 'birthday-month', etc.\n   */\n  id?: ResolvableString\n\n  /**\n   * Optional prefix for the name attributes of individual date inputs.\n   * If not provided, uses `code`. Separated by '-' from the field names.\n   *\n   * @example 'start-date' // Creates names like 'start-date[day]', 'start-date[month]', etc.\n   */\n  namePrefix?: ResolvableString\n\n  /** Additional CSS classes to add to the date-input container. */\n  classes?: ResolvableString\n\n  /** Additional HTML attributes (such as data attributes) to add to the date-input container. */\n  attributes?: Record<string, any>\n}\n\n/** GOV.UK Date Input capturing a full date - day, month and year. */\nexport interface GovUKDateInputFull extends FieldBlockDefinition, GovUKDateInputBase {}\n\n/** GOV.UK Date Input capturing a month and year only. */\nexport interface GovUKDateInputYearMonth extends FieldBlockDefinition, GovUKDateInputBase {}\n\n/** GOV.UK Date Input capturing a day and month only. */\nexport interface GovUKDateInputMonthDay extends FieldBlockDefinition, GovUKDateInputBase {}\n\n/**\n * Supports field-specific error targeting through validation `details.field` property.\n */\nfunction shouldHaveError(itemName: string, hasErrors: boolean, errorDetails?: Record<string, any>): boolean {\n  if (!hasErrors) {\n    return false\n  }\n\n  if (!errorDetails?.field) {\n    return true // If date fails validation in general, all fields get error styling\n  }\n\n  return errorDetails.field === itemName\n}\n\n/**\n * Combine CSS classes, filtering out undefined values.\n * // TODO: Maybe we want to move this elsewhere? Seems like it could be useful\n */\nfunction combineClasses(...classes: (string | undefined)[]): string | undefined {\n  const combined = classes.filter(Boolean).join(' ')\n  return combined || undefined\n}\n\n/**\n * Creates the individual input field configurations required by the GOV.UK date input template.\n */\nfunction buildItems(\n  fields: Array<{ name: 'day' | 'month' | 'year'; label: string; classes: string }>,\n  block: ResolvedPropsOf<GovUKDateInputFull | GovUKDateInputYearMonth | GovUKDateInputMonthDay>,\n  dateParts: { year?: string; month?: string; day?: string },\n  errorDetails?: Record<string, any>,\n) {\n  const namePrefix = block.namePrefix || block.code\n  const idPrefix = block.id || block.code\n  const hasErrors = Boolean(block.errors?.length)\n\n  return fields.map(field => {\n    const hasFieldError = shouldHaveError(field.name, hasErrors, errorDetails)\n    const value = dateParts[field.name]\n\n    return {\n      id: `${idPrefix}-${field.name}`,\n      name: `${namePrefix}[${field.name}]`,\n      label: field.label,\n      value,\n      pattern: '[0-9]*',\n      inputmode: 'numeric',\n      classes: combineClasses(field.classes, hasFieldError ? 'govuk-input--error' : undefined),\n    }\n  })\n}\n\n/**\n * Creates the parameter object required by the GOV.UK date input template\n */\nfunction buildParams(\n  block: ResolvedPropsOf<GovUKDateInputFull | GovUKDateInputYearMonth | GovUKDateInputMonthDay>,\n  items: ReturnType<typeof buildItems>,\n) {\n  return {\n    id: block.id || block.code,\n    fieldset: normaliseGovukFieldset(block.fieldset, block.label),\n    hint: normaliseGovukTextParam(block.hint),\n    errorMessage: normaliseGovukErrorMessage(block.errors),\n    formGroup: block.formGroup,\n    items,\n    classes: block.classes,\n    attributes: block.attributes,\n  }\n}\n\nconst fullDatePaths = { year: 'year', month: 'month', day: 'day' }\nconst yearMonthPaths = { year: 'year', month: 'month' }\nconst monthDayPaths = { month: 'month', day: 'day' }\n\n/**\n * Creates a GOV.UK Date Input field with day, month, and year.\n * Stores the value as an ISO date string in YYYY-MM-DD format.\n * Automatically adds formatters and parsers for the ISO conversion.\n *\n * @see https://design-system.service.gov.uk/components/date-input/\n * @example\n * ```typescript\n * GovUKDateInputFull({\n *   code: 'date_of_birth',\n *   label: 'Date of birth',\n *   hint: 'For example, 31 3 1980',\n * })\n * ```\n */\nexport const GovUKDateInputFull = nunjucksComponent<GovUKDateInputFull>('govukDateInputFull', {\n  field: true,\n  inputSchema: z.object({ year: z.string(), month: z.string(), day: z.string() }).strict(),\n  // The rendered inputs are `${id}-day/-month/-year`, so error summary links land on the first.\n  errorAnchor: props => `${props.id || props.code}-day`,\n  prepare: props => ({\n    ...props,\n    formatters: [Transformer.Object.ToISO(fullDatePaths), ...(props.formatters ?? [])],\n    parsers: [Transformer.Object.FromISO(fullDatePaths), ...(props.parsers ?? [])],\n  }),\n  render: (props, nunjucksEnv) => {\n    const dateParts = (props.value as { day?: string; month?: string; year?: string } | undefined) ?? {}\n    const errorDetails = props.errors?.[0]?.details\n\n    const items = buildItems(\n      [\n        { name: 'day', label: 'Day', classes: 'govuk-input--width-2' },\n        { name: 'month', label: 'Month', classes: 'govuk-input--width-2' },\n        { name: 'year', label: 'Year', classes: 'govuk-input--width-4' },\n      ],\n      props,\n      dateParts,\n      errorDetails,\n    )\n\n    const params = buildParams(props, items)\n\n    return nunjucksEnv.render('govuk/components/date-input/template.njk', { params })\n  },\n})\n\n/**\n * Creates a GOV.UK Date Input field with month and year only.\n * Stores the value as an ISO date string in YYYY-MM format.\n * Automatically adds formatters and parsers for the ISO conversion.\n * Useful for credit card expiry dates, employment periods, etc.\n *\n * @see https://design-system.service.gov.uk/components/date-input/\n * @example\n * ```typescript\n * GovUKDateInputYearMonth({\n *   code: 'card_expiry',\n *   label: 'Expiry date',\n *   hint: 'For example, 03 2025',\n * })\n * ```\n */\nexport const GovUKDateInputYearMonth = nunjucksComponent<GovUKDateInputYearMonth>('govukDateInputYearMonth', {\n  field: true,\n  inputSchema: z.object({ year: z.string(), month: z.string() }).strict(),\n  // The rendered inputs are `${id}-month/-year`, so error summary links land on the first.\n  errorAnchor: props => `${props.id || props.code}-month`,\n  prepare: props => ({\n    ...props,\n    formatters: [Transformer.Object.ToISO(yearMonthPaths), ...(props.formatters ?? [])],\n    parsers: [Transformer.Object.FromISO(yearMonthPaths), ...(props.parsers ?? [])],\n  }),\n  render: (props, nunjucksEnv) => {\n    const dateParts = (props.value as { day?: string; month?: string; year?: string } | undefined) ?? {}\n    const errorDetails = props.errors?.[0]?.details\n\n    const items = buildItems(\n      [\n        { name: 'month', label: 'Month', classes: 'govuk-input--width-2' },\n        { name: 'year', label: 'Year', classes: 'govuk-input--width-4' },\n      ],\n      props,\n      dateParts,\n      errorDetails,\n    )\n\n    const params = buildParams(props, items)\n\n    return nunjucksEnv.render('govuk/components/date-input/template.njk', { params })\n  },\n})\n\n/**\n * Creates a GOV.UK Date Input field with day and month only.\n * Stores the value as an ISO date string in MM-DD format.\n * Automatically adds formatters and parsers for the ISO conversion.\n * Useful for recurring dates like birthdays or anniversaries.\n *\n * @see https://design-system.service.gov.uk/components/date-input/\n * @example\n * ```typescript\n * GovUKDateInputMonthDay({\n *   code: 'anniversary',\n *   label: 'Anniversary date',\n *   hint: 'For example, 25 12',\n * })\n * ```\n */\nexport const GovUKDateInputMonthDay = nunjucksComponent<GovUKDateInputMonthDay>('govukDateInputMonthDay', {\n  field: true,\n  inputSchema: z.object({ month: z.string(), day: z.string() }).strict(),\n  // The rendered inputs are `${id}-day/-month`, so error summary links land on the first.\n  errorAnchor: props => `${props.id || props.code}-day`,\n  prepare: props => ({\n    ...props,\n    formatters: [Transformer.Object.ToISO(monthDayPaths), ...(props.formatters ?? [])],\n    parsers: [Transformer.Object.FromISO(monthDayPaths), ...(props.parsers ?? [])],\n  }),\n  render: (props, nunjucksEnv) => {\n    const dateParts = (props.value as { day?: string; month?: string; year?: string } | undefined) ?? {}\n    const errorDetails = props.errors?.[0]?.details\n\n    const items = buildItems(\n      [\n        { name: 'day', label: 'Day', classes: 'govuk-input--width-2' },\n        { name: 'month', label: 'Month', classes: 'govuk-input--width-2' },\n      ],\n      props,\n      dateParts,\n      errorDetails,\n    )\n\n    const params = buildParams(props, items)\n\n    return nunjucksEnv.render('govuk/components/date-input/template.njk', { params })\n  },\n})\n","import { BlockDefinition, ResolvableBoolean, ResolvableString } from '@ministryofjustice/hmpps-forge/core/components'\nimport { nunjucksComponent } from '../../utils/nunjucksComponent'\nimport { normaliseGovukTextHtmlContent } from '../../utils/govukParamNormalisers'\n\n/**\n * GOV.UK Details component.\n *\n * An expandable/collapsible section following the GOV.UK Design System patterns.\n * Renders as a `<details>` element with summary and content sections.\n *\n * @see https://design-system.service.gov.uk/components/details/\n * @example\n * ```typescript\n * GovUKDetails({\n *   summaryText: 'Help with nationality',\n *   text: 'We need to know your nationality so we can work out which elections you can vote in.',\n * })\n * ```\n */\nexport interface GovUKDetails extends BlockDefinition {\n  /** Text to display in the summary (clickable part). Required unless summaryHtml is provided. */\n  summaryText?: ResolvableString\n\n  /** HTML to display in the summary (clickable part). Takes precedence over summaryText. */\n  summaryHtml?: ResolvableString\n\n  /** Plain text content for the expandable section */\n  text?: ResolvableString\n\n  /** HTML content for the expandable section. Takes precedence over text. */\n  html?: ResolvableString\n\n  /** Child blocks to render in the expandable section. Takes precedence over text/html. */\n  content?: BlockDefinition[]\n\n  /** Whether the details should be expanded by default */\n  open?: ResolvableBoolean\n\n  /** ID attribute for the details element */\n  id?: ResolvableString\n\n  /** Additional CSS classes for the details element */\n  classes?: ResolvableString\n\n  /** Custom HTML attributes for the details element */\n  attributes?: Record<string, any>\n}\n\n/**\n * GOV.UK Details component.\n *\n * An expandable/collapsible section following the GOV.UK Design System patterns.\n * Renders as a `<details>` element with summary and content sections.\n *\n * @see https://design-system.service.gov.uk/components/details/\n * @example\n * ```typescript\n * GovUKDetails({\n *   summaryText: 'Help with nationality',\n *   text: 'We need to know your nationality so we can work out which elections you can vote in.',\n * })\n * ```\n */\nexport const GovUKDetails = nunjucksComponent<GovUKDetails>('govukDetails', {\n  render: (props, nunjucksEnv) => {\n    const content = normaliseGovukTextHtmlContent({\n      text: props.text,\n      html: props.html,\n      blocks: props.content,\n    })\n    const params: Record<string, any> = {\n      summaryText: props.summaryHtml ? undefined : props.summaryText,\n      summaryHtml: props.summaryHtml,\n      text: content.text,\n      html: content.html,\n      open: props.open,\n      id: props.id,\n      classes: props.classes,\n      attributes: props.attributes,\n    }\n\n    return nunjucksEnv.render('govuk/components/details/template.njk', { params })\n  },\n})\n","import { BlockDefinition, ResolvableString } from '@ministryofjustice/hmpps-forge/core/components'\nimport { nunjucksComponent } from '../../utils/nunjucksComponent'\n\n/**\n * GOV.UK Exit This Page component.\n *\n * A safety feature providing a quick escape route. Use it on pages with sensitive\n * information where users may need to hide what they're viewing quickly.\n *\n * Users can activate the exit by clicking the button or pressing Shift 3 times.\n *\n * @see https://design-system.service.gov.uk/components/exit-this-page/\n * @example\n * ```typescript\n * // Basic usage with default redirect\n * GovUKExitThisPage({})\n *\n * // With custom redirect URL\n * GovUKExitThisPage({\n *   redirectUrl: 'https://www.google.co.uk',\n * })\n *\n * // With custom button text\n * GovUKExitThisPage({\n *   text: 'Leave this page',\n *   redirectUrl: 'https://www.google.co.uk',\n * })\n * ```\n */\nexport interface GovUKExitThisPage extends BlockDefinition {\n  /**\n   * Plain text content for the button.\n   * If `html` is provided, this option will be ignored.\n   * Defaults to \"Emergency Exit this page\" with 'Emergency' visually hidden.\n   */\n  text?: ResolvableString\n\n  /**\n   * HTML content for the button.\n   * Takes precedence over `text` if both are provided.\n   * Defaults to \"Emergency Exit this page\" with 'Emergency' visually hidden.\n   */\n  html?: ResolvableString\n\n  /**\n   * URL to redirect the current tab to when the exit button is activated.\n   * Defaults to \"https://www.bbc.co.uk/weather\".\n   */\n  redirectUrl?: ResolvableString\n\n  /**\n   * ID attribute to add to the exit this page container.\n   */\n  id?: ResolvableString\n\n  /**\n   * Additional CSS classes to add to the exit this page container.\n   */\n  classes?: ResolvableString\n\n  /**\n   * HTML attributes (for example data attributes) to add to the exit this page container.\n   */\n  attributes?: Record<string, any>\n\n  /**\n   * Text announced by screen readers when Exit this Page has been activated\n   * via the keyboard shortcut.\n   * Defaults to \"Loading.\".\n   */\n  activatedText?: ResolvableString\n\n  /**\n   * Text announced by screen readers when the keyboard shortcut has timed out\n   * without successful activation.\n   * Defaults to \"Exit this page expired.\".\n   */\n  timedOutText?: ResolvableString\n\n  /**\n   * Text announced by screen readers when the user must press Shift two more\n   * times to activate the button.\n   * Defaults to \"Shift, press 2 more times to exit.\".\n   */\n  pressTwoMoreTimesText?: ResolvableString\n\n  /**\n   * Text announced by screen readers when the user must press Shift one more\n   * time to activate the button.\n   * Defaults to \"Shift, press 1 more time to exit.\".\n   */\n  pressOneMoreTimeText?: ResolvableString\n}\n\n/**\n * GOV.UK Exit This Page component.\n *\n * A safety feature providing a quick escape route. Use it on pages with sensitive\n * information where users may need to hide what they're viewing quickly.\n *\n * Users can activate the exit by clicking the button or pressing Shift 3 times.\n *\n * @see https://design-system.service.gov.uk/components/exit-this-page/\n * @example\n * ```typescript\n * // Basic usage with default redirect\n * GovUKExitThisPage({})\n *\n * // With custom redirect URL\n * GovUKExitThisPage({\n *   redirectUrl: 'https://www.google.co.uk',\n * })\n *\n * // With custom button text\n * GovUKExitThisPage({\n *   text: 'Leave this page',\n *   redirectUrl: 'https://www.google.co.uk',\n * })\n * ```\n */\nexport const GovUKExitThisPage = nunjucksComponent<GovUKExitThisPage>('govukExitThisPage', {\n  render: (props, nunjucksEnv) => {\n    const params: Record<string, any> = {\n      id: props.id,\n      text: props.html ? undefined : props.text,\n      html: props.html,\n      redirectUrl: props.redirectUrl,\n      classes: props.classes,\n      attributes: props.attributes,\n      activatedText: props.activatedText,\n      timedOutText: props.timedOutText,\n      pressTwoMoreTimesText: props.pressTwoMoreTimesText,\n      pressOneMoreTimeText: props.pressOneMoreTimeText,\n    }\n\n    return nunjucksEnv.render('govuk/components/exit-this-page/template.njk', { params })\n  },\n})\n","import { BlockDefinition, ResolvableString } from '@ministryofjustice/hmpps-forge/core/components'\nimport { nunjucksComponent } from '../../utils/nunjucksComponent'\nimport { normaliseGovukTextHtmlContent } from '../../utils/govukParamNormalisers'\n\n/**\n * GOV.UK Inset Text component.\n *\n * Use this to differentiate a block of text from the surrounding content.\n * Useful for quotes, examples, or additional information that needs visual distinction.\n *\n * @see https://design-system.service.gov.uk/components/inset-text/\n * @example\n * ```typescript\n * GovUKInsetText({\n *   text: 'It can take up to 8 weeks to register a lasting power of attorney if there are no mistakes in the application.',\n * })\n * ```\n */\nexport interface GovUKInsetText extends BlockDefinition {\n  /**\n   * Plain text content for the inset text.\n   * Required unless `html` is provided.\n   * If `html` is provided, this option will be ignored.\n   */\n  text?: ResolvableString\n\n  /**\n   * HTML content for the inset text.\n   * Takes precedence over `text` if both are provided.\n   * Use this when you need to include links or other HTML elements.\n   */\n  html?: ResolvableString\n\n  /**\n   * Child blocks to render in the inset text.\n   * Takes precedence over `text` and `html`.\n   */\n  blocks?: BlockDefinition[]\n\n  /**\n   * ID attribute to add to the inset text container.\n   * Useful for linking to this specific section or for testing.\n   */\n  id?: ResolvableString\n\n  /**\n   * Additional CSS classes to add to the inset text container.\n   * Use this to apply custom styling or spacing classes.\n   */\n  classes?: ResolvableString\n\n  /**\n   * HTML attributes (for example data attributes) to add to the inset text container.\n   * Useful for adding custom data attributes or ARIA attributes.\n   */\n  attributes?: Record<string, any>\n}\n\n/**\n * GOV.UK Inset Text component.\n *\n * Use this to differentiate a block of text from the surrounding content.\n * Useful for quotes, examples, or additional information that needs visual distinction.\n *\n * @see https://design-system.service.gov.uk/components/inset-text/\n * @example\n * ```typescript\n * GovUKInsetText({\n *   text: 'It can take up to 8 weeks to register a lasting power of attorney if there are no mistakes in the application.',\n * })\n * ```\n */\nexport const GovUKInsetText = nunjucksComponent<GovUKInsetText>('govukInsetText', {\n  render: (props, nunjucksEnv) => {\n    const content = normaliseGovukTextHtmlContent({\n      text: props.text,\n      html: props.html,\n      blocks: props.blocks,\n    })\n    const params: Record<string, any> = {\n      text: content.text,\n      html: content.html,\n      id: props.id,\n      classes: props.classes,\n      attributes: props.attributes,\n    }\n\n    return nunjucksEnv.render('govuk/components/inset-text/template.njk', { params })\n  },\n})\n","import { BlockDefinition, ResolvableBoolean, ResolvableString } from '@ministryofjustice/hmpps-forge/core/components'\nimport { nunjucksComponent } from '../../utils/nunjucksComponent'\nimport { normaliseGovukTextHtmlContent } from '../../utils/govukParamNormalisers'\n\n/**\n * GOV.UK Notification Banner component.\n *\n * Use this to display important notifications to users, such as success messages\n * or important information they need to know about.\n *\n * @see https://design-system.service.gov.uk/components/notification-banner/\n * @example\n * ```typescript\n * // Basic important notification\n * GovUKNotificationBanner({\n *   text: 'You have 7 days left to send your application.',\n * })\n *\n * // Success notification\n * GovUKNotificationBanner({\n *   bannerType: 'success',\n *   text: 'Training outcome recorded and trainee withdrawn',\n * })\n *\n * // With custom title\n * GovUKNotificationBanner({\n *   titleText: 'Application received',\n *   text: 'We will review your application and get back to you within 5 working days.',\n * })\n * ```\n */\nexport interface GovUKNotificationBanner extends BlockDefinition {\n  /**\n   * The text that displays in the notification banner.\n   * You can use any string with this option.\n   * If you set `html`, this option is not required and is ignored.\n   */\n  text?: ResolvableString\n\n  /**\n   * The HTML to use within the notification banner.\n   * You can use any string with this option.\n   * If you set `html`, `text` is not required and is ignored.\n   */\n  html?: ResolvableString\n\n  /**\n   * Child blocks to render in the notification banner content area.\n   * Takes precedence over text/html.\n   */\n  content?: BlockDefinition[]\n\n  /**\n   * The title text that displays in the notification banner.\n   * You can use any string with this option.\n   * Use this option to set text that does not contain HTML.\n   *\n   * The available default values are 'Important', 'Success', and null:\n   * - if you do not set `bannerType`, `titleText` defaults to \"Important\"\n   * - if you set `bannerType` to \"success\", `titleText` defaults to \"Success\"\n   * - if you set `titleHtml`, this option is ignored\n   */\n  titleText?: ResolvableString\n\n  /**\n   * The title HTML to use within the notification banner.\n   * You can use any string with this option.\n   * Use this option to set text that contains HTML.\n   * If you set `titleHtml`, the `titleText` option is ignored.\n   */\n  titleHtml?: ResolvableString\n\n  /**\n   * Sets heading level for the title only.\n   * You can only use values between 1 and 6 with this option.\n   * The default is 2.\n   */\n  titleHeadingLevel?: ResolvableString\n\n  /**\n   * The type of notification to render.\n   * You can use only \"success\" or null values with this option.\n   *\n   * If you set `bannerType` to \"success\", the notification banner sets `role` to \"alert\".\n   * JavaScript then moves the keyboard focus to the notification banner when the page loads.\n   *\n   * If you do not set `bannerType`, the notification banner sets `role` to \"region\".\n   *\n   * Note: This property is named `bannerType` instead of `type` to avoid conflict\n   * with the forge block definition type discriminator.\n   */\n  bannerType?: ResolvableString\n\n  /**\n   * Overrides the value of the `role` attribute for the notification banner.\n   * Defaults to \"region\".\n   * If you set `bannerType` to \"success\", `role` defaults to \"alert\".\n   */\n  role?: ResolvableString\n\n  /**\n   * The `id` for the banner title, and the `aria-labelledby` attribute in the banner.\n   * Defaults to \"govuk-notification-banner-title\".\n   */\n  titleId?: ResolvableString\n\n  /**\n   * If you set `bannerType` to \"success\", or `role` to \"alert\", JavaScript moves\n   * the keyboard focus to the notification banner when the page loads.\n   * To disable this behaviour, set `disableAutoFocus` to true.\n   */\n  disableAutoFocus?: ResolvableBoolean\n\n  /** Additional CSS classes for the notification banner container */\n  classes?: ResolvableString\n\n  /** Custom HTML attributes for the notification banner container */\n  attributes?: Record<string, any>\n}\n\n/**\n * GOV.UK Notification Banner component.\n *\n * Use this to display important notifications to users, such as success messages\n * or important information they need to know about.\n *\n * @see https://design-system.service.gov.uk/components/notification-banner/\n * @example\n * ```typescript\n * // Basic important notification\n * GovUKNotificationBanner({\n *   text: 'You have 7 days left to send your application.',\n * })\n *\n * // Success notification\n * GovUKNotificationBanner({\n *   bannerType: 'success',\n *   text: 'Training outcome recorded and trainee withdrawn',\n * })\n *\n * // With custom title\n * GovUKNotificationBanner({\n *   titleText: 'Application received',\n *   text: 'We will review your application and get back to you within 5 working days.',\n * })\n * ```\n */\nexport const GovUKNotificationBanner = nunjucksComponent<GovUKNotificationBanner>('govukNotificationBanner', {\n  render: (props, nunjucksEnv) => {\n    const content = normaliseGovukTextHtmlContent({\n      text: props.text,\n      html: props.html,\n      blocks: props.content,\n    })\n    const params: Record<string, any> = {\n      text: content.text,\n      html: content.html,\n      titleText: props.titleHtml ? undefined : props.titleText,\n      titleHtml: props.titleHtml,\n      titleHeadingLevel: props.titleHeadingLevel,\n      type: props.bannerType,\n      role: props.role,\n      titleId: props.titleId,\n      disableAutoFocus: props.disableAutoFocus,\n      classes: props.classes,\n      attributes: props.attributes,\n    }\n\n    return nunjucksEnv.render('govuk/components/notification-banner/template.njk', { params })\n  },\n})\n","import {\n  BlockDefinition,\n  ResolvableArray,\n  ResolvableBoolean,\n  ResolvableString,\n} from '@ministryofjustice/hmpps-forge/core/components'\nimport { nunjucksComponent } from '../../utils/nunjucksComponent'\n\n/**\n * Pagination link configuration for previous/next navigation.\n */\nexport interface PaginationLink {\n  /** The link's URL. Required. */\n  href: ResolvableString\n\n  /** Text content of the link. Defaults to \"Previous page\" or \"Next page\". */\n  text?: ResolvableString\n\n  /** HTML content of the link. Takes precedence over text. */\n  html?: ResolvableString\n\n  /** Label underneath the link providing context (e.g., \"Introduction\"). */\n  labelText?: ResolvableString\n\n  /** Custom HTML attributes for the anchor element. */\n  attributes?: Record<string, any>\n\n  /**\n   * Conditional visibility for this link. When the evaluated value is `false`,\n   * the link is omitted from rendering. Defaults to showing the link.\n   */\n  visibleWhen?: ResolvableBoolean\n}\n\n/**\n * Pagination item for numbered page navigation.\n */\nexport interface PaginationItem {\n  /** The page number text. Required unless ellipsis is true. */\n  number?: ResolvableString\n\n  /** Visually hidden label for screen readers (e.g., \"Page 1\"). */\n  visuallyHiddenText?: ResolvableString\n\n  /** The link's URL. Required unless ellipsis is true. */\n  href?: ResolvableString\n\n  /** Set to true to indicate the current page. */\n  current?: ResolvableBoolean\n\n  /** Set to true to render an ellipsis instead of a page number. */\n  ellipsis?: ResolvableBoolean\n\n  /** Custom HTML attributes for the anchor element. */\n  attributes?: Record<string, any>\n\n  /**\n   * Conditional visibility for this item. When the evaluated value is `false`,\n   * the item is omitted from rendering. Defaults to showing the item.\n   */\n  visibleWhen?: ResolvableBoolean\n}\n\n/**\n * GOV.UK Pagination component.\n *\n * Use this to navigate between pages. Supports previous/next links with labels, and\n * numbered page navigation.\n *\n * @see https://design-system.service.gov.uk/components/pagination/\n * @example\n * ```typescript\n * GovUKPagination({\n *   previous: {\n *     href: '/docs/introduction',\n *     labelText: 'Introduction',\n *   },\n *   next: {\n *     href: '/docs/getting-started',\n *     labelText: 'Getting Started',\n *   },\n * })\n * ```\n */\nexport interface GovUKPagination extends BlockDefinition {\n  /** Link to the previous page. */\n  previous?: PaginationLink\n\n  /** Link to the next page. */\n  next?: PaginationLink\n\n  /** Numbered page items for multi-page navigation. */\n  items?: ResolvableArray<PaginationItem>\n\n  /** Accessibility label for the navigation landmark. Defaults to \"Pagination\". */\n  landmarkLabel?: ResolvableString\n\n  /** Additional CSS classes for the pagination nav element. */\n  classes?: ResolvableString\n\n  /** Custom HTML attributes for the pagination nav element. */\n  attributes?: Record<string, any>\n}\n\n/**\n * GOV.UK Pagination component.\n *\n * Use this to navigate between pages. Supports previous/next links with labels, and\n * numbered page navigation.\n *\n * @see https://design-system.service.gov.uk/components/pagination/\n * @example\n * ```typescript\n * GovUKPagination({\n *   previous: {\n *     href: '/docs/introduction',\n *     labelText: 'Introduction',\n *   },\n *   next: {\n *     href: '/docs/getting-started',\n *     labelText: 'Getting Started',\n *   },\n * })\n * ```\n */\nexport const GovUKPagination = nunjucksComponent<GovUKPagination>('govukPagination', {\n  render: (props, nunjucksEnv) => {\n    const params: Record<string, any> = {\n      previous: props.previous?.visibleWhen === false ? undefined : props.previous,\n      next: props.next?.visibleWhen === false ? undefined : props.next,\n      items: props.items?.filter(item => item.visibleWhen !== false),\n      landmarkLabel: props.landmarkLabel,\n      classes: props.classes,\n      attributes: props.attributes,\n    }\n\n    return nunjucksEnv.render('govuk/components/pagination/template.njk', { params })\n  },\n})\n","import { BlockDefinition, ResolvableNumber, ResolvableString } from '@ministryofjustice/hmpps-forge/core/components'\nimport { nunjucksComponent } from '../../utils/nunjucksComponent'\nimport { normaliseGovukTextHtmlContent } from '../../utils/govukParamNormalisers'\n\n/**\n * GOV.UK Panel component.\n *\n * Use this to display a confirmation panel, typically shown on confirmation pages\n * at the end of a transaction. Renders with a turquoise background and white text.\n *\n * @see https://design-system.service.gov.uk/components/panel/\n * @example\n * ```typescript\n * GovUKPanel({\n *   titleText: 'Application complete',\n *   text: 'Your reference number is HDJ2123F',\n * })\n * ```\n */\nexport interface GovUKPanel extends BlockDefinition {\n  /**\n   * Plain text to use within the panel title.\n   * Required unless `titleHtml` is provided.\n   * If `titleHtml` is provided, this option will be ignored.\n   */\n  titleText?: ResolvableString\n\n  /**\n   * HTML to use within the panel title.\n   * Takes precedence over `titleText`.\n   * If `titleHtml` is provided, the `titleText` option will be ignored.\n   */\n  titleHtml?: ResolvableString\n\n  /**\n   * Heading level for the panel title, from 1 to 6.\n   * Defaults to 1 (h1).\n   */\n  headingLevel?: ResolvableNumber\n\n  /**\n   * Plain text content for the panel body.\n   * Required unless `html` is provided.\n   * If `html` is provided, this option will be ignored.\n   */\n  text?: ResolvableString\n\n  /**\n   * HTML content for the panel body.\n   * Takes precedence over `text`.\n   * If `html` is provided, the `text` option will be ignored.\n   */\n  html?: ResolvableString\n\n  /**\n   * Child blocks to render in the panel body.\n   * Takes precedence over `text` and `html`.\n   */\n  blocks?: BlockDefinition[]\n\n  /**\n   * Additional CSS classes for the panel container.\n   */\n  classes?: ResolvableString\n\n  /**\n   * Custom HTML attributes (for example data attributes) to add to the panel container.\n   */\n  attributes?: Record<string, any>\n}\n\n/**\n * GOV.UK Panel component.\n *\n * Use this to display a confirmation panel, typically shown on confirmation pages\n * at the end of a transaction. Renders with a turquoise background and white text.\n *\n * @see https://design-system.service.gov.uk/components/panel/\n * @example\n * ```typescript\n * GovUKPanel({\n *   titleText: 'Application complete',\n *   text: 'Your reference number is HDJ2123F',\n * })\n * ```\n */\nexport const GovUKPanel = nunjucksComponent<GovUKPanel>('govukPanel', {\n  render: (props, nunjucksEnv) => {\n    const content = normaliseGovukTextHtmlContent({\n      text: props.text,\n      html: props.html,\n      blocks: props.blocks,\n    })\n    const params: Record<string, any> = {\n      titleText: props.titleHtml ? undefined : props.titleText,\n      titleHtml: props.titleHtml,\n      headingLevel: props.headingLevel,\n      text: content.text,\n      html: content.html,\n      classes: props.classes,\n      attributes: props.attributes,\n    }\n\n    return nunjucksEnv.render('govuk/components/panel/template.njk', { params })\n  },\n})\n","import {\n  BlockDefinition,\n  ResolvableArray,\n  ResolvableNumber,\n  ResolvableBoolean,\n  ResolvableObject,\n  ResolvableString,\n  EvaluatedBlock,\n} from '@ministryofjustice/hmpps-forge/core/components'\nimport { nunjucksComponent } from '../../utils/nunjucksComponent'\nimport { normaliseGovukTextHtmlContent } from '../../utils/govukParamNormalisers'\n\n/**\n * Action item for summary list rows or card headers.\n * Renders as a link with optional visually hidden text for accessibility.\n */\nexport interface SummaryListActionItem {\n  /** The value of the link's `href` attribute. Required. */\n  href: ResolvableString\n\n  /** Plain text content for the action link. Required unless html is provided. */\n  text?: ResolvableString\n\n  /** HTML content for the action link. Takes precedence over text. */\n  html?: ResolvableString\n\n  /**\n   * Additional accessible text appended to the action link.\n   * Useful for providing context when the action text alone is not descriptive enough.\n   * For example, \"Change\" might need \"name\" appended to become \"Change name\".\n   */\n  visuallyHiddenText?: ResolvableString\n\n  /** Additional CSS classes for the action link. */\n  classes?: ResolvableString\n\n  /** Custom HTML attributes for the action link element. */\n  attributes?: Record<string, any>\n}\n\n/**\n * Actions configuration for summary list rows or card headers.\n * Contains an array of action items and optional wrapper classes.\n */\nexport interface SummaryListActions {\n  /** The action link items to display. */\n  items?: ResolvableArray<SummaryListActionItem>\n\n  /** Additional CSS classes for the actions wrapper element. */\n  classes?: ResolvableString\n}\n\n/**\n * Key (label) for a summary list row.\n * Displays on the left side of the row as the reference/label.\n */\nexport interface SummaryListKey {\n  /** Plain text content for the key. Required unless html is provided. */\n  text?: ResolvableString\n\n  /** HTML content for the key. Takes precedence over text. */\n  html?: ResolvableString\n\n  /** Additional CSS classes for the key wrapper. */\n  classes?: ResolvableString\n}\n\n/**\n * Value for a summary list row.\n * Displays on the right side of the row as the content/answer.\n */\nexport interface SummaryListValue {\n  /** Plain text content for the value. Required unless html is provided. */\n  text?: ResolvableString\n\n  /** HTML content for the value. Takes precedence over text. */\n  html?: ResolvableString\n\n  /** Child blocks to render for the value. Takes precedence over text/html. */\n  blocks?: BlockDefinition[]\n\n  /** Additional CSS classes for the value wrapper. */\n  classes?: ResolvableString\n}\n\n/**\n * A row in the summary list, containing a key-value pair and optional actions.\n */\nexport interface SummaryListRow {\n  /** The reference content (key/label) for this row. Required. */\n  key: SummaryListKey\n\n  /** The value content for this row. */\n  value?: SummaryListValue\n\n  /** Optional action links for this row (e.g., \"Change\", \"Remove\"). */\n  actions?: ResolvableObject<SummaryListActions>\n\n  /** Additional CSS classes for the row div element. */\n  classes?: ResolvableString\n\n  /**\n   * Conditional visibility for this row. When the evaluated value is `false`,\n   * the row is omitted from rendering. Defaults to showing the row.\n   *\n   * @example Answer('contactMethod').match(Condition.Equals('email'))\n   */\n  visibleWhen?: ResolvableBoolean\n}\n\n/**\n * Title configuration for a summary card header.\n */\nexport interface SummaryCardTitle {\n  /** Plain text content for the card title. Takes precedence if html is not provided. */\n  text?: ResolvableString\n\n  /** HTML content for the card title. Takes precedence over text. */\n  html?: ResolvableString\n\n  /** Heading level for the title, from 1 to 6. Defaults to 2. */\n  headingLevel?: ResolvableNumber\n\n  /** Additional CSS classes for the title wrapper. */\n  classes?: ResolvableString\n}\n\n/**\n * Summary card configuration to wrap the summary list.\n * When provided, the summary list is wrapped in a card with a header.\n */\nexport interface SummaryCard {\n  /** Title displayed in the card header. */\n  title?: SummaryCardTitle\n\n  /** Action links displayed in the card header. */\n  actions?: ResolvableObject<SummaryListActions>\n\n  /** Additional CSS classes for the card container. */\n  classes?: ResolvableString\n\n  /** Custom HTML attributes for the card container. */\n  attributes?: Record<string, any>\n}\n\n/**\n * GOV.UK Summary List component.\n *\n * Displays a list of key-value pairs, commonly used to summarise information\n * such as form answers in a \"check your answers\" page.\n *\n * @see https://design-system.service.gov.uk/components/summary-list/\n * @example\n * ```typescript\n * GovUKSummaryList({\n *   rows: [\n *     {\n *       key: { text: 'Name' },\n *       value: { text: 'John Smith' },\n *       actions: {\n *         items: [\n *           { href: '/change-name', text: 'Change', visuallyHiddenText: 'name' },\n *         ],\n *       },\n *     },\n *   ],\n * })\n * ```\n *\n * @example With summary card wrapper\n * ```typescript\n * GovUKSummaryList({\n *   card: {\n *     title: { text: 'Personal details' },\n *     actions: {\n *       items: [\n *         { href: '/delete', text: 'Delete', visuallyHiddenText: 'personal details' },\n *       ],\n *     },\n *   },\n *   rows: [\n *     { key: { text: 'Name' }, value: { text: 'John Smith' } },\n *     { key: { text: 'Email' }, value: { text: 'john@example.com' } },\n *   ],\n * })\n * ```\n */\nexport interface GovUKSummaryList extends BlockDefinition {\n  /** The rows within the summary list. Each row contains a key-value pair. Required. */\n  rows: ResolvableArray<SummaryListRow>\n\n  /**\n   * Optional card configuration to wrap the summary list.\n   * If provided, the summary list will be displayed inside a summary card\n   * with an optional title and header actions.\n   */\n  card?: ResolvableObject<SummaryCard>\n\n  /** Additional CSS classes for the summary list dl element. */\n  classes?: ResolvableString\n\n  /** Custom HTML attributes for the summary list dl element. */\n  attributes?: Record<string, any>\n}\n\ntype EvaluatedSummaryListRow = EvaluatedBlock<GovUKSummaryList>['rows'][number]\n\nfunction normaliseSummaryListRow(row: EvaluatedSummaryListRow) {\n  return {\n    ...row,\n    value: normaliseSummaryListValue(row.value),\n  }\n}\n\nfunction normaliseSummaryListValue(value: EvaluatedSummaryListRow['value'] | undefined) {\n  if (!value) {\n    return undefined\n  }\n\n  const { blocks, ...valueParams } = value\n  const content = normaliseGovukTextHtmlContent({\n    text: value.text,\n    html: value.html,\n    blocks,\n  })\n\n  return {\n    ...valueParams,\n    ...content,\n  }\n}\n\n/**\n * GOV.UK Summary List component.\n *\n * Displays a list of key-value pairs, commonly used to summarise information\n * such as form answers in a \"check your answers\" page.\n *\n * @see https://design-system.service.gov.uk/components/summary-list/\n * @example\n * ```typescript\n * GovUKSummaryList({\n *   rows: [\n *     {\n *       key: { text: 'Name' },\n *       value: { text: 'John Smith' },\n *       actions: {\n *         items: [\n *           { href: '/change-name', text: 'Change', visuallyHiddenText: 'name' },\n *         ],\n *       },\n *     },\n *   ],\n * })\n * ```\n *\n * @example With summary card wrapper\n * ```typescript\n * GovUKSummaryList({\n *   card: {\n *     title: { text: 'Personal details' },\n *     actions: {\n *       items: [\n *         { href: '/delete', text: 'Delete', visuallyHiddenText: 'personal details' },\n *       ],\n *     },\n *   },\n *   rows: [\n *     { key: { text: 'Name' }, value: { text: 'John Smith' } },\n *     { key: { text: 'Email' }, value: { text: 'john@example.com' } },\n *   ],\n * })\n * ```\n */\nexport const GovUKSummaryList = nunjucksComponent<GovUKSummaryList>('govukSummaryList', {\n  render: (props, nunjucksEnv) => {\n    const params: Record<string, any> = {\n      rows: props.rows.filter(row => row.visibleWhen !== false).map(normaliseSummaryListRow),\n      card: props.card,\n      classes: props.classes,\n      attributes: props.attributes,\n    }\n\n    return nunjucksEnv.render('govuk/components/summary-list/template.njk', { params })\n  },\n})\n","import {\n  BlockDefinition,\n  ResolvableArray,\n  ResolvableBoolean,\n  ResolvableNumber,\n  ResolvableString,\n  EvaluatedBlock,\n} from '@ministryofjustice/hmpps-forge/core/components'\nimport { nunjucksComponent } from '../../utils/nunjucksComponent'\nimport { renderGovukBlocksToHtml } from '../../utils/govukParamNormalisers'\n\n/**\n * Configuration for a table header cell.\n * Used in the `head` array to define column headers.\n */\nexport interface TableHeadCell {\n  /** Plain text content for the header cell. If `html` is provided, this will be ignored. */\n  text?: ResolvableString\n\n  /** HTML content for the header cell. Takes precedence over `text`. */\n  html?: ResolvableString\n\n  /** Specify format of the cell. Use \"numeric\" for right-aligned numeric data. */\n  format?: ResolvableString\n\n  /** Additional CSS classes for the header cell. */\n  classes?: ResolvableString\n\n  /** Number of columns this cell should span. */\n  colspan?: ResolvableNumber\n\n  /** Number of rows this cell should span. */\n  rowspan?: ResolvableNumber\n\n  /** Custom HTML attributes for the header cell element. */\n  attributes?: Record<string, any>\n}\n\n/**\n * Configuration for a table body cell.\n * Used in row arrays to define cell content.\n */\nexport interface TableCell {\n  /** Plain text content for the cell. If `html` or `blocks` is provided, this will be ignored. */\n  text?: ResolvableString\n\n  /** HTML content for the cell. Takes precedence over `text`; ignored when `blocks` is provided. */\n  html?: ResolvableString\n\n  /** Child blocks to render for the cell. Takes precedence over `text` and `html`. */\n  blocks?: BlockDefinition[]\n\n  /** Specify format of the cell. Use \"numeric\" for right-aligned numeric data. */\n  format?: ResolvableString\n\n  /** Additional CSS classes for the cell. */\n  classes?: ResolvableString\n\n  /** Number of columns this cell should span. */\n  colspan?: ResolvableNumber\n\n  /** Number of rows this cell should span. */\n  rowspan?: ResolvableNumber\n\n  /** Custom HTML attributes for the cell element. */\n  attributes?: Record<string, any>\n}\n\n/**\n * A row in the table, consisting of an array of cells.\n */\nexport type TableRow = TableCell[]\n\n/**\n * GOV.UK Table component.\n *\n * Displays data in a structured table format.\n * Supports headers, captions, numeric formatting, and row/column spans.\n *\n * @see https://design-system.service.gov.uk/components/table/\n * @example\n * ```typescript\n * GovUKTable({\n *   caption: 'Monthly savings',\n *   captionClasses: 'govuk-table__caption--m',\n *   head: [\n *     { text: 'Month' },\n *     { text: 'Amount', format: 'numeric' },\n *   ],\n *   rows: [\n *     [{ text: 'January' }, { text: '£85', format: 'numeric' }],\n *     [{ text: 'February' }, { text: '£165', format: 'numeric' }],\n *   ],\n * })\n * ```\n */\nexport interface GovUKTable extends BlockDefinition {\n  /** The rows within the table. Each row is an array of cells. Supports dynamic expressions. */\n  rows: ResolvableArray<TableRow>\n\n  /** Table header cells. Renders a `<thead>` with a single header row. */\n  head?: ResolvableArray<TableHeadCell>\n\n  /** Caption text displayed above the table. Useful for accessibility. */\n  caption?: ResolvableString\n\n  /** CSS classes for the caption. Use GOV.UK typography classes like \"govuk-table__caption--m\". */\n  captionClasses?: ResolvableString\n\n  /** If true, the first cell in each row will be rendered as a header (`<th>`) with row scope. */\n  firstCellIsHeader?: ResolvableBoolean\n\n  /** Additional CSS classes for the table element. */\n  classes?: ResolvableString\n\n  /** Custom HTML attributes for the table element. */\n  attributes?: Record<string, any>\n}\n\ntype EvaluatedTableRow = EvaluatedBlock<GovUKTable>['rows'][number]\ntype EvaluatedTableCell = EvaluatedTableRow[number]\n\nfunction normaliseTableCell(cell: EvaluatedTableCell) {\n  const { blocks, ...cellParams } = cell\n  const blocksHtml = renderGovukBlocksToHtml(blocks)\n\n  if (blocksHtml === undefined) {\n    return cellParams\n  }\n\n  return {\n    ...cellParams,\n    text: undefined,\n    html: blocksHtml,\n  }\n}\n\n/**\n * GOV.UK Table component.\n *\n * Displays data in a structured table format.\n * Supports headers, captions, numeric formatting, and row/column spans.\n *\n * @see https://design-system.service.gov.uk/components/table/\n * @example\n * ```typescript\n * GovUKTable({\n *   caption: 'Monthly savings',\n *   captionClasses: 'govuk-table__caption--m',\n *   head: [\n *     { text: 'Month' },\n *     { text: 'Amount', format: 'numeric' },\n *   ],\n *   rows: [\n *     [{ text: 'January' }, { text: '£85', format: 'numeric' }],\n *     [{ text: 'February' }, { text: '£165', format: 'numeric' }],\n *   ],\n * })\n * ```\n */\nexport const GovUKTable = nunjucksComponent<GovUKTable>('govukTable', {\n  render: (props, nunjucksEnv) => {\n    const params: Record<string, any> = {\n      rows: props.rows.map(row => row.map(normaliseTableCell)),\n      head: props.head,\n      caption: props.caption,\n      captionClasses: props.captionClasses,\n      firstCellIsHeader: props.firstCellIsHeader,\n      classes: props.classes,\n      attributes: props.attributes,\n    }\n\n    return nunjucksEnv.render('govuk/components/table/template.njk', { params })\n  },\n})\n","import {\n  BlockDefinition,\n  ResolvableArray,\n  ResolvableBoolean,\n  ResolvableString,\n} from '@ministryofjustice/hmpps-forge/core/components'\nimport { nunjucksComponent } from '../../utils/nunjucksComponent'\nimport { normaliseGovukTextHtmlContent } from '../../utils/govukParamNormalisers'\n\n/**\n * Panel content configuration for a tab.\n * The content that is displayed when the tab is selected.\n */\nexport interface TabPanel {\n  /** Plain text content for the panel. Required unless html or blocks is provided. */\n  text?: ResolvableString\n\n  /** HTML content for the panel. Takes precedence over text. */\n  html?: ResolvableString\n\n  /** Child blocks to render in the panel. Takes precedence over text/html. */\n  blocks?: BlockDefinition[]\n\n  /** Custom HTML attributes for the panel element. */\n  attributes?: Record<string, any>\n}\n\n/**\n * An individual tab within the tabs component.\n */\nexport interface TabItem {\n  /**\n   * Specific ID attribute for the tab item.\n   * This is used as the panel's ID and for the tab link's href.\n   */\n  id: ResolvableString\n\n  /** The text label displayed on the tab. Required. */\n  label: ResolvableString\n\n  /** The content of the tab panel. Required. */\n  panel: TabPanel\n\n  /** Custom HTML attributes for the tab element. */\n  attributes?: Record<string, any>\n\n  /**\n   * Conditional visibility for this tab. When the evaluated value is `false`,\n   * the tab is omitted from rendering.\n   */\n  visibleWhen?: ResolvableBoolean\n}\n\n/**\n * GOV.UK Tabs component.\n *\n * Tabs allow users to navigate between related sections of content, displaying one\n * section at a time. Renders as a set of tab buttons that reveal associated content\n * panels. On mobile, tabs are displayed as a table of contents.\n *\n * @see https://design-system.service.gov.uk/components/tabs/\n * @example\n * ```typescript\n * GovUKTabs({\n *   id: 'my-tabs',\n *   items: [\n *     {\n *       id: 'past-day',\n *       label: 'Past day',\n *       panel: { text: 'Content for past day tab' },\n *     },\n *     {\n *       id: 'past-week',\n *       label: 'Past week',\n *       panel: { text: 'Content for past week tab' },\n *     },\n *   ],\n * })\n * ```\n *\n * @example With child blocks as panel content\n * ```typescript\n * GovUKTabs({\n *   id: 'tabs-with-blocks',\n *   items: [\n *     {\n *       id: 'overview',\n *       label: 'Overview',\n *       panel: {\n *         blocks: [\n *           GovUKInsetText({ text: 'Important overview information' }),\n *           GovUKWarningText({ text: 'Warning message' }),\n *         ],\n *       },\n *     },\n *   ],\n * })\n * ```\n */\nexport interface GovUKTabs extends BlockDefinition {\n  /**\n   * Unique ID for the tabs component.\n   * This is used for the main component and to compose the ID attribute for each item.\n   */\n  id: ResolvableString\n\n  /**\n   * Title for the tabs table of contents.\n   * Displayed on mobile where tabs become a table of contents.\n   * Defaults to \"Contents\".\n   */\n  title?: ResolvableString\n\n  /** The individual tabs within the tabs component. Required. */\n  items: ResolvableArray<TabItem>\n\n  /** Additional CSS classes for the tabs element. */\n  classes?: ResolvableString\n\n  /** Custom HTML attributes for the tabs element. */\n  attributes?: Record<string, any>\n}\n\n/**\n * GOV.UK Tabs component.\n *\n * Tabs allow users to navigate between related sections of content, displaying one\n * section at a time. Renders as a set of tab buttons that reveal associated content\n * panels. On mobile, tabs are displayed as a table of contents.\n *\n * @see https://design-system.service.gov.uk/components/tabs/\n * @example\n * ```typescript\n * GovUKTabs({\n *   id: 'my-tabs',\n *   items: [\n *     {\n *       id: 'past-day',\n *       label: 'Past day',\n *       panel: { text: 'Content for past day tab' },\n *     },\n *     {\n *       id: 'past-week',\n *       label: 'Past week',\n *       panel: { text: 'Content for past week tab' },\n *     },\n *   ],\n * })\n * ```\n *\n * @example With child blocks as panel content\n * ```typescript\n * GovUKTabs({\n *   id: 'tabs-with-blocks',\n *   items: [\n *     {\n *       id: 'overview',\n *       label: 'Overview',\n *       panel: {\n *         blocks: [\n *           GovUKInsetText({ text: 'Important overview information' }),\n *           GovUKWarningText({ text: 'Warning message' }),\n *         ],\n *       },\n *     },\n *   ],\n * })\n * ```\n */\nexport const GovUKTabs = nunjucksComponent<GovUKTabs>('govukTabs', {\n  render: (props, nunjucksEnv) => {\n    // Process items, handling child blocks in panel content\n    const processedItems = props.items\n      .filter(item => item.visibleWhen !== false)\n      .map(item => {\n        const panel = normaliseGovukTextHtmlContent({\n          text: item.panel.text,\n          html: item.panel.html,\n          blocks: item.panel.blocks,\n        })\n\n        return {\n          id: item.id,\n          label: item.label,\n          attributes: item.attributes,\n          panel: {\n            text: panel.text,\n            html: panel.html,\n            attributes: item.panel.attributes,\n          },\n        }\n      })\n\n    const params: Record<string, any> = {\n      id: props.id,\n      title: props.title,\n      items: processedItems,\n      classes: props.classes,\n      attributes: props.attributes,\n    }\n\n    return nunjucksEnv.render('govuk/components/tabs/template.njk', { params })\n  },\n})\n","import { BlockDefinition, ResolvableString } from '@ministryofjustice/hmpps-forge/core/components'\nimport { nunjucksComponent } from '../../utils/nunjucksComponent'\n\n/**\n * GOV.UK Tag component.\n *\n * Use this to display a status indicator, phase banner label, or other short\n * piece of information that needs to stand out from surrounding content. Tags are\n * compact, coloured labels used to show the status of something, like a phase\n * banner or task status.\n *\n * Different colours can be applied using the `classes` property with modifier\n * classes like `govuk-tag--grey`, `govuk-tag--green`, `govuk-tag--teal`,\n * `govuk-tag--blue`, `govuk-tag--purple`, `govuk-tag--magenta`,\n * `govuk-tag--red`, `govuk-tag--orange`, or `govuk-tag--yellow`.\n *\n * @see https://design-system.service.gov.uk/components/tag/\n * @example\n * ```typescript\n * // Default blue tag\n * GovUKTag({\n *   text: 'Active',\n * })\n *\n * // Green tag for completed status\n * GovUKTag({\n *   text: 'Completed',\n *   classes: 'govuk-tag--green',\n * })\n *\n * // Red tag for error status\n * GovUKTag({\n *   text: 'Failed',\n *   classes: 'govuk-tag--red',\n * })\n * ```\n */\nexport interface GovUKTag extends BlockDefinition {\n  /**\n   * Plain text content for the tag.\n   * Required unless `html` is provided.\n   * If `html` is provided, this option will be ignored.\n   */\n  text?: ResolvableString\n\n  /**\n   * HTML content for the tag.\n   * Takes precedence over `text` if both are provided.\n   * Use this when you need to include HTML elements within the tag.\n   */\n  html?: ResolvableString\n\n  /**\n   * Additional CSS classes to add to the tag.\n   * Use modifier classes to change the tag colour:\n   * - `govuk-tag--grey` - Grey tag for inactive or default states\n   * - `govuk-tag--green` - Green tag for success or completed states\n   * - `govuk-tag--teal` - Teal tag\n   * - `govuk-tag--blue` - Blue tag (default colour if no modifier)\n   * - `govuk-tag--purple` - Purple tag\n   * - `govuk-tag--magenta` - Magenta tag\n   * - `govuk-tag--red` - Red tag for errors or urgent states\n   * - `govuk-tag--orange` - Orange tag for warnings\n   * - `govuk-tag--yellow` - Yellow tag for pending or attention states\n   */\n  classes?: ResolvableString\n\n  /**\n   * HTML attributes (for example data attributes) to add to the tag.\n   * Useful for adding custom data attributes or ARIA attributes.\n   */\n  attributes?: Record<string, any>\n}\n\n/**\n * GOV.UK Tag component.\n *\n * Use this to display a status indicator, phase banner label, or other short\n * piece of information that needs to stand out from surrounding content. Tags are\n * compact, coloured labels used to show the status of something, like a phase\n * banner or task status.\n *\n * Different colours can be applied using the `classes` property with modifier\n * classes like `govuk-tag--grey`, `govuk-tag--green`, `govuk-tag--teal`,\n * `govuk-tag--blue`, `govuk-tag--purple`, `govuk-tag--magenta`,\n * `govuk-tag--red`, `govuk-tag--orange`, or `govuk-tag--yellow`.\n *\n * @see https://design-system.service.gov.uk/components/tag/\n * @example\n * ```typescript\n * // Default blue tag\n * GovUKTag({\n *   text: 'Active',\n * })\n *\n * // Green tag for completed status\n * GovUKTag({\n *   text: 'Completed',\n *   classes: 'govuk-tag--green',\n * })\n *\n * // Red tag for error status\n * GovUKTag({\n *   text: 'Failed',\n *   classes: 'govuk-tag--red',\n * })\n * ```\n */\nexport const GovUKTag = nunjucksComponent<GovUKTag>('govukTag', {\n  render: (props, nunjucksEnv) => {\n    const params: Record<string, any> = {\n      text: props.html ? undefined : props.text,\n      html: props.html,\n      classes: props.classes,\n      attributes: props.attributes,\n    }\n\n    return nunjucksEnv.render('govuk/components/tag/template.njk', { params })\n  },\n})\n","import {\n  BlockDefinition,\n  ResolvableArray,\n  ResolvableBoolean,\n  ResolvableObject,\n  ResolvableString,\n} from '@ministryofjustice/hmpps-forge/core/components'\nimport { nunjucksComponent } from '../../utils/nunjucksComponent'\n\n/**\n * Tag configuration for task status.\n * Renders a colored tag to indicate task completion status.\n *\n * @see https://design-system.service.gov.uk/components/tag/\n */\nexport interface TaskListStatusTag {\n  /** Plain text content for the tag. Required unless html is provided. */\n  text?: ResolvableString\n\n  /** HTML content for the tag. Takes precedence over text. */\n  html?: ResolvableString\n\n  /**\n   * Additional CSS classes for the tag.\n   * Use modifier classes like `govuk-tag--blue`, `govuk-tag--grey` to change color.\n   */\n  classes?: ResolvableString\n\n  /** Custom HTML attributes for the tag element. */\n  attributes?: Record<string, any>\n}\n\n/**\n * Status configuration for a task list item.\n * Can display either a tag (for statuses like \"Completed\", \"In progress\")\n * or plain text/HTML (for statuses like \"Cannot start yet\").\n */\nexport interface TaskListStatus {\n  /**\n   * Tag configuration for the status.\n   * Use this for statuses that should be visually prominent.\n   * If provided, text and html are ignored.\n   */\n  tag?: ResolvableObject<TaskListStatusTag>\n\n  /**\n   * Plain text for the status.\n   * Used when a simpler, non-tag status is needed.\n   * Ignored if tag or html is provided.\n   */\n  text?: ResolvableString\n\n  /**\n   * HTML content for the status.\n   * Used when custom HTML is needed for the status.\n   * Ignored if tag is provided.\n   */\n  html?: ResolvableString\n\n  /** Additional CSS classes for the status container. */\n  classes?: ResolvableString\n}\n\n/**\n * Title configuration for a task list item.\n * Contains the main clickable text that describes the task.\n */\nexport interface TaskListTitle {\n  /** Plain text content for the title. Required unless html is provided. */\n  text?: ResolvableString\n\n  /** HTML content for the title. Takes precedence over text. */\n  html?: ResolvableString\n\n  /** Additional CSS classes for the title wrapper. */\n  classes?: ResolvableString\n}\n\n/**\n * Hint configuration for a task list item.\n * Provides additional descriptive text below the title.\n */\nexport interface TaskListHint {\n  /** Plain text content for the hint. Required unless html is provided. */\n  text?: ResolvableString\n\n  /** HTML content for the hint. Takes precedence over text. */\n  html?: ResolvableString\n}\n\n/**\n * A single item in the task list.\n * Represents one task with its title, optional hint, status, and link.\n */\nexport interface TaskListItem {\n  /**\n   * The main title for the task.\n   * This is the primary clickable text that describes what the task involves.\n   */\n  title: TaskListTitle\n\n  /**\n   * Optional hint text displayed below the title.\n   * Use to provide additional context about the task.\n   */\n  hint?: TaskListHint\n\n  /**\n   * The status of the task.\n   * Displays on the right side of the task row.\n   */\n  status: TaskListStatus\n\n  /**\n   * The URL to navigate to when the task title is clicked.\n   * If not provided, the title is rendered as plain text rather than a link.\n   */\n  href?: ResolvableString\n\n  /** Additional CSS classes for the item div. */\n  classes?: ResolvableString\n\n  /**\n   * Conditional visibility for this task. When the evaluated value is `false`,\n   * the task is omitted from rendering. Defaults to showing the task.\n   *\n   * @example Answer('applicationType').match(Condition.Equals('business'))\n   */\n  visibleWhen?: ResolvableBoolean\n}\n\n/**\n * GOV.UK Task List component.\n *\n * Displays a list of tasks with their completion status.\n * Commonly used to show users a list of tasks they need to complete\n * as part of a multi-step process, such as applying for something or registering.\n *\n * @see https://design-system.service.gov.uk/components/task-list/\n * @example\n * ```typescript\n * GovUKTaskList({\n *   items: [\n *     {\n *       title: { text: 'Company information' },\n *       href: '/company-info',\n *       status: {\n *         tag: { text: 'Completed', classes: 'govuk-tag--blue' },\n *       },\n *     },\n *     {\n *       title: { text: 'Contact details' },\n *       hint: { text: 'Include email and phone number' },\n *       href: '/contact-details',\n *       status: {\n *         tag: { text: 'In progress', classes: 'govuk-tag--blue' },\n *       },\n *     },\n *     {\n *       title: { text: 'Submit application' },\n *       status: {\n *         text: 'Cannot start yet',\n *       },\n *     },\n *   ],\n * })\n * ```\n *\n * @example With custom id prefix\n * ```typescript\n * GovUKTaskList({\n *   idPrefix: 'registration',\n *   items: [\n *     {\n *       title: { text: 'Personal details' },\n *       href: '/personal-details',\n *       status: { tag: { text: 'Completed' } },\n *     },\n *   ],\n * })\n * ```\n */\nexport interface GovUKTaskList extends BlockDefinition {\n  /** The items within the task list. Each item represents a single task. Required. */\n  items: ResolvableArray<TaskListItem>\n\n  /** Additional CSS classes for the task list ul element. */\n  classes?: ResolvableString\n\n  /** Custom HTML attributes for the task list ul element. */\n  attributes?: Record<string, any>\n\n  /**\n   * Optional prefix for id attributes.\n   * Used to prefix the id attribute for task list item tags and hints.\n   * Defaults to \"task-list\".\n   */\n  idPrefix?: ResolvableString\n}\n\n/**\n * GOV.UK Task List component.\n *\n * Displays a list of tasks with their completion status.\n * Commonly used to show users a list of tasks they need to complete\n * as part of a multi-step process, such as applying for something or registering.\n *\n * @see https://design-system.service.gov.uk/components/task-list/\n * @example\n * ```typescript\n * GovUKTaskList({\n *   items: [\n *     {\n *       title: { text: 'Company information' },\n *       href: '/company-info',\n *       status: {\n *         tag: { text: 'Completed', classes: 'govuk-tag--blue' },\n *       },\n *     },\n *     {\n *       title: { text: 'Contact details' },\n *       hint: { text: 'Include email and phone number' },\n *       href: '/contact-details',\n *       status: {\n *         tag: { text: 'In progress', classes: 'govuk-tag--blue' },\n *       },\n *     },\n *     {\n *       title: { text: 'Submit application' },\n *       status: {\n *         text: 'Cannot start yet',\n *       },\n *     },\n *   ],\n * })\n * ```\n *\n * @example With custom id prefix\n * ```typescript\n * GovUKTaskList({\n *   idPrefix: 'registration',\n *   items: [\n *     {\n *       title: { text: 'Personal details' },\n *       href: '/personal-details',\n *       status: { tag: { text: 'Completed' } },\n *     },\n *   ],\n * })\n * ```\n */\nexport const GovUKTaskList = nunjucksComponent<GovUKTaskList>('govukTaskList', {\n  render: (props, nunjucksEnv) => {\n    const params: Record<string, any> = {\n      items: props.items.filter(item => item.visibleWhen !== false),\n      classes: props.classes,\n      attributes: props.attributes,\n      idPrefix: props.idPrefix,\n    }\n\n    return nunjucksEnv.render('govuk/components/task-list/template.njk', { params })\n  },\n})\n","import { BlockDefinition, ResolvableString } from '@ministryofjustice/hmpps-forge/core/components'\nimport { nunjucksComponent } from '../../utils/nunjucksComponent'\nimport { normaliseGovukTextHtmlContent } from '../../utils/govukParamNormalisers'\n\n/**\n * GOV.UK Warning Text component.\n *\n * Use this to display important warnings to users. Renders with an exclamation mark\n * icon and bold text styling following the GOV.UK Design System.\n *\n * @see https://design-system.service.gov.uk/components/warning-text/\n * @example\n * ```typescript\n * GovUKWarningText({\n *   text: 'You can be fined up to £5,000 if you do not register.',\n * })\n * ```\n */\nexport interface GovUKWarningText extends BlockDefinition {\n  /** Plain text content for the warning. Required unless html is provided. */\n  text?: ResolvableString\n\n  /** HTML content for the warning. Takes precedence over text. */\n  html?: ResolvableString\n\n  /** Child blocks to render in the warning. Takes precedence over text/html. */\n  blocks?: BlockDefinition[]\n\n  /** Fallback text for the warning icon (for screen readers). Defaults to \"Warning\". */\n  iconFallbackText?: ResolvableString\n\n  /** Additional CSS classes for the warning text container */\n  classes?: ResolvableString\n\n  /** Custom HTML attributes for the warning text container */\n  attributes?: Record<string, any>\n}\n\n/**\n * GOV.UK Warning Text component.\n *\n * Use this to display important warnings to users. Renders with an exclamation mark\n * icon and bold text styling following the GOV.UK Design System.\n *\n * @see https://design-system.service.gov.uk/components/warning-text/\n * @example\n * ```typescript\n * GovUKWarningText({\n *   text: 'You can be fined up to £5,000 if you do not register.',\n * })\n * ```\n */\nexport const GovUKWarningText = nunjucksComponent<GovUKWarningText>('govukWarningText', {\n  render: (props, nunjucksEnv) => {\n    const content = normaliseGovukTextHtmlContent({\n      text: props.text,\n      html: props.html,\n      blocks: props.blocks,\n    })\n    const params: Record<string, any> = {\n      text: content.text,\n      html: content.html,\n      iconFallbackText: props.iconFallbackText,\n      classes: props.classes,\n      attributes: props.attributes,\n    }\n\n    return nunjucksEnv.render('govuk/components/warning-text/template.njk', { params })\n  },\n})\n","import { BlockDefinition, ComponentRegistryEntry } from '@ministryofjustice/hmpps-forge/core/components'\n\nimport { GovUKAccordion } from './accordion/govukAccordion'\nimport { GovUKBackLink } from './back-link/govukBackLink'\nimport { GovUKBody } from './body/govukBody'\nimport { GovUKBreadcrumbs } from './breadcrumbs/govukBreadcrumbs'\nimport { GovUKButton, GovUKLinkButton } from './button/govukButton'\nimport { GovUKButtonGroup } from './button-group/govukButtonGroup'\nimport { GovUKGridRow } from './grid-row/govukGridRow'\nimport { GovUKHeading } from './heading/govukHeading'\nimport { GovUKList } from './list/govukList'\nimport { GovUKSectionBreak } from './section-break/govukSectionBreak'\nimport { GovUKTextInput } from './text-input/govukTextInput'\nimport { GovUKPasswordInput } from './password-input/govukPasswordInput'\nimport { GovUKSelectInput } from './select-input/govukSelectInput'\nimport { GovUKRadioInput } from './radio-input/govukRadioInput'\nimport { GovUKCheckboxInput } from './checkbox-input/govukCheckboxInput'\nimport { GovUKTextareaInput } from './textarea-input/govukTextareaInput'\nimport { GovUKCharacterCount } from './character-count/govukCharacterCount'\nimport {\n  GovUKDateInputFull,\n  GovUKDateInputYearMonth,\n  GovUKDateInputMonthDay,\n} from './date-input/govukDateInputVariants'\nimport { GovUKDetails } from './details/govukDetails'\nimport { GovUKExitThisPage } from './exit-this-page/govukExitThisPage'\nimport { GovUKInsetText } from './inset-text/govukInsetText'\nimport { GovUKNotificationBanner } from './notification-banner/govukNotificationBanner'\nimport { GovUKPagination } from './pagination/govukPagination'\nimport { GovUKPanel } from './panel/govukPanel'\nimport { GovUKSummaryList } from './summary-list/govukSummaryList'\nimport { GovUKTable } from './table/govukTable'\nimport { GovUKTabs } from './tabs/govukTabs'\nimport { GovUKTag } from './tag/govukTag'\nimport { GovUKTaskList } from './task-list/govukTaskList'\nimport { GovUKWarningText } from './warning-text/govukWarningText'\n\n// Re-export supporting types\nexport type {\n  AccordionItemHeading,\n  AccordionItemSummary,\n  AccordionItemContent,\n  AccordionItem,\n} from './accordion/govukAccordion'\nexport type { BreadcrumbItem } from './breadcrumbs/govukBreadcrumbs'\nexport type { SelectItem } from './select-input/govukSelectInput'\nexport type { PaginationLink, PaginationItem } from './pagination/govukPagination'\nexport type {\n  SummaryListActionItem,\n  SummaryListActions,\n  SummaryListKey,\n  SummaryListValue,\n  SummaryListRow,\n  SummaryCardTitle,\n  SummaryCard,\n} from './summary-list/govukSummaryList'\nexport type { TableHeadCell, TableCell, TableRow } from './table/govukTable'\nexport type { GovUKRadioInputItem, GovUKRadioInputDivider } from './radio-input/govukRadioInput'\nexport type { GovUKCheckboxInputItem, GovUKCheckboxInputDivider } from './checkbox-input/govukCheckboxInput'\nexport type { GovUKDateInputBase } from './date-input/govukDateInputVariants'\nexport type { TabPanel, TabItem } from './tabs/govukTabs'\nexport type {\n  TaskListStatusTag,\n  TaskListStatus,\n  TaskListTitle,\n  TaskListHint,\n  TaskListItem,\n} from './task-list/govukTaskList'\n\n// Re-export the components (each const is both the block builder and the registry entry)\nexport { GovUKAccordion } from './accordion/govukAccordion'\nexport { GovUKBackLink } from './back-link/govukBackLink'\nexport { GovUKBody } from './body/govukBody'\nexport { GovUKBreadcrumbs } from './breadcrumbs/govukBreadcrumbs'\nexport { GovUKButton, GovUKLinkButton } from './button/govukButton'\nexport { GovUKButtonGroup } from './button-group/govukButtonGroup'\nexport { GovUKGridRow } from './grid-row/govukGridRow'\nexport type { GovUKGridColumn } from './grid-row/govukGridRow'\nexport { GovUKHeading } from './heading/govukHeading'\nexport { GovUKList } from './list/govukList'\nexport { GovUKSectionBreak } from './section-break/govukSectionBreak'\nexport { GovUKTextInput } from './text-input/govukTextInput'\nexport { GovUKPasswordInput } from './password-input/govukPasswordInput'\nexport { GovUKSelectInput } from './select-input/govukSelectInput'\nexport { GovUKRadioInput } from './radio-input/govukRadioInput'\nexport { GovUKCheckboxInput } from './checkbox-input/govukCheckboxInput'\nexport { GovUKTextareaInput } from './textarea-input/govukTextareaInput'\nexport { GovUKCharacterCount } from './character-count/govukCharacterCount'\nexport {\n  GovUKDateInputFull,\n  GovUKDateInputYearMonth,\n  GovUKDateInputMonthDay,\n} from './date-input/govukDateInputVariants'\nexport { GovUKDetails } from './details/govukDetails'\nexport { GovUKExitThisPage } from './exit-this-page/govukExitThisPage'\nexport { GovUKInsetText } from './inset-text/govukInsetText'\nexport { GovUKNotificationBanner } from './notification-banner/govukNotificationBanner'\nexport { GovUKPagination } from './pagination/govukPagination'\nexport { GovUKPanel } from './panel/govukPanel'\nexport { GovUKSummaryList } from './summary-list/govukSummaryList'\nexport { GovUKTable } from './table/govukTable'\nexport { GovUKTabs } from './tabs/govukTabs'\nexport { GovUKTag } from './tag/govukTag'\nexport { GovUKTaskList } from './task-list/govukTaskList'\nexport { GovUKWarningText } from './warning-text/govukWarningText'\n\n/** All GOV.UK component definitions */\nexport const govukComponents: ComponentRegistryEntry<BlockDefinition, string>[] = [\n  GovUKAccordion,\n  GovUKBackLink,\n  GovUKBody,\n  GovUKBreadcrumbs,\n  GovUKButton,\n  GovUKLinkButton,\n  GovUKButtonGroup,\n  GovUKGridRow,\n  GovUKHeading,\n  GovUKList,\n  GovUKSectionBreak,\n  GovUKTextInput,\n  GovUKPasswordInput,\n  GovUKSelectInput,\n  GovUKRadioInput,\n  GovUKCheckboxInput,\n  GovUKTextareaInput,\n  GovUKCharacterCount,\n  GovUKDateInputFull,\n  GovUKDateInputYearMonth,\n  GovUKDateInputMonthDay,\n  GovUKDetails,\n  GovUKExitThisPage,\n  GovUKInsetText,\n  GovUKNotificationBanner,\n  GovUKPagination,\n  GovUKPanel,\n  GovUKSummaryList,\n  GovUKTable,\n  GovUKTabs,\n  GovUKTag,\n  GovUKTaskList,\n  GovUKWarningText,\n]\n","/**\n * GOV.UK Design System utility CSS classes.\n *\n * These classes can be used to modify component appearance without\n * writing custom CSS. Use them in field definitions via the `classes` property.\n *\n * @see https://design-system.service.gov.uk/\n */\nexport const GovUKUtilityClasses = {\n  /** Hide content visually while keeping it accessible to screen readers */\n  VisuallyHidden: 'govuk-visually-hidden',\n\n  /** Hide content visually but make it visible when focused (e.g. skip links) */\n  VisuallyHiddenFocusable: 'govuk-visually-hidden-focusable',\n\n  /**\n   * Fixed-width input classes. The width roughly corresponds to the number\n   * of characters that will fit in the input at the standard font size.\n   *\n   * @see https://design-system.service.gov.uk/components/text-input/#use-appropriately-sized-text-inputs\n   */\n  Input: {\n    /** 2 character width (e.g. day, age) */\n    Width2: 'govuk-input--width-2',\n\n    /** 3 character width (e.g. area code) */\n    Width3: 'govuk-input--width-3',\n\n    /** 4 character width (e.g. year, PIN) */\n    Width4: 'govuk-input--width-4',\n\n    /** 5 character width (e.g. postcode) */\n    Width5: 'govuk-input--width-5',\n\n    /** 10 character width (e.g. phone number) */\n    Width10: 'govuk-input--width-10',\n\n    /** 20 character width (e.g. name, email) */\n    Width20: 'govuk-input--width-20',\n\n    /** 30 character width (e.g. address line) */\n    Width30: 'govuk-input--width-30',\n\n    /** Tabular numbers with extra letter spacing (e.g. reference numbers) */\n    ExtraLetterSpacing: 'govuk-input--extra-letter-spacing',\n  },\n\n  /** Label size modifiers */\n  Label: {\n    /** Extra large label (48px, typically for single-field page headings) */\n    ExtraLarge: 'govuk-label--xl',\n\n    /** Large label (36px) */\n    Large: 'govuk-label--l',\n\n    /** Medium label (24px) */\n    Medium: 'govuk-label--m',\n\n    /** Small label (bold, standard size) */\n    Small: 'govuk-label--s',\n  },\n\n  /** Fieldset legend size modifiers */\n  Fieldset: {\n    /** Extra large legend text (48px, typically for page headings) */\n    ExtraLargeLabel: 'govuk-fieldset__legend--xl',\n\n    /** Large legend text (36px) */\n    LargeLabel: 'govuk-fieldset__legend--l',\n\n    /** Medium legend text (24px) */\n    MediumLabel: 'govuk-fieldset__legend--m',\n\n    /** Small legend text (bold, standard size) */\n    SmallLabel: 'govuk-fieldset__legend--s',\n  },\n\n  /** Radio button layout modifiers */\n  Radios: {\n    /** Display radio buttons horizontally instead of stacked */\n    Inline: 'govuk-radios--inline',\n\n    /** Use smaller radio button styling (24px instead of 40px) */\n    Small: 'govuk-radios--small',\n  },\n\n  /** Checkbox layout modifiers */\n  Checkboxes: {\n    /** Use smaller checkbox styling (24px instead of 40px) */\n    Small: 'govuk-checkboxes--small',\n  },\n\n  /**\n   * Tag colour variants.\n   *\n   * @see https://design-system.service.gov.uk/components/tag/\n   */\n  Tag: {\n    Blue: 'govuk-tag--blue',\n    Green: 'govuk-tag--green',\n    Grey: 'govuk-tag--grey',\n    Red: 'govuk-tag--red',\n    Orange: 'govuk-tag--orange',\n    Yellow: 'govuk-tag--yellow',\n    Purple: 'govuk-tag--purple',\n    Teal: 'govuk-tag--teal',\n    Magenta: 'govuk-tag--magenta',\n  },\n\n  /**\n   * Responsive width override classes. Full width on mobile,\n   * specified fraction on tablet and above.\n   *\n   * @see https://design-system.service.gov.uk/styles/layout/#width-override-classes\n   */\n  Width: {\n    Full: 'govuk-!-width-full',\n    ThreeQuarters: 'govuk-!-width-three-quarters',\n    TwoThirds: 'govuk-!-width-two-thirds',\n    OneHalf: 'govuk-!-width-one-half',\n    OneThird: 'govuk-!-width-one-third',\n    OneQuarter: 'govuk-!-width-one-quarter',\n  },\n\n  /** Display override classes */\n  Display: {\n    Inline: 'govuk-!-display-inline',\n    InlineBlock: 'govuk-!-display-inline-block',\n    Block: 'govuk-!-display-block',\n    None: 'govuk-!-display-none',\n\n    /** Hidden in print only */\n    NonePrint: 'govuk-!-display-none-print',\n  },\n\n  /**\n   * Responsive font size overrides.\n   *\n   * @see https://design-system.service.gov.uk/styles/typography/#font-size\n   */\n  FontSize: {\n    Size16: 'govuk-!-font-size-16',\n    Size19: 'govuk-!-font-size-19',\n    Size24: 'govuk-!-font-size-24',\n    Size27: 'govuk-!-font-size-27',\n    Size36: 'govuk-!-font-size-36',\n    Size48: 'govuk-!-font-size-48',\n    Size80: 'govuk-!-font-size-80',\n  },\n\n  /** Font weight overrides */\n  FontWeight: {\n    Regular: 'govuk-!-font-weight-regular',\n    Bold: 'govuk-!-font-weight-bold',\n  },\n\n  /** Text alignment overrides */\n  TextAlign: {\n    Left: 'govuk-!-text-align-left',\n    Centre: 'govuk-!-text-align-centre',\n    Right: 'govuk-!-text-align-right',\n  },\n\n  /**\n   * Responsive margin overrides (scale 0–9).\n   *\n   * Spacing scale: 0=0, 1=5px, 2=10px, 3=15px, 4=20px, 5=25px, 6=30px, 7=40px, 8=50px, 9=60px\n   * (values 4–9 are smaller on mobile).\n   *\n   * @see https://design-system.service.gov.uk/styles/spacing/#spacing-override-classes\n   */\n  Margin: {\n    All0: 'govuk-!-margin-0',\n    All1: 'govuk-!-margin-1',\n    All2: 'govuk-!-margin-2',\n    All3: 'govuk-!-margin-3',\n    All4: 'govuk-!-margin-4',\n    All5: 'govuk-!-margin-5',\n    All6: 'govuk-!-margin-6',\n    All7: 'govuk-!-margin-7',\n    All8: 'govuk-!-margin-8',\n    All9: 'govuk-!-margin-9',\n\n    Top0: 'govuk-!-margin-top-0',\n    Top1: 'govuk-!-margin-top-1',\n    Top2: 'govuk-!-margin-top-2',\n    Top3: 'govuk-!-margin-top-3',\n    Top4: 'govuk-!-margin-top-4',\n    Top5: 'govuk-!-margin-top-5',\n    Top6: 'govuk-!-margin-top-6',\n    Top7: 'govuk-!-margin-top-7',\n    Top8: 'govuk-!-margin-top-8',\n    Top9: 'govuk-!-margin-top-9',\n\n    Right0: 'govuk-!-margin-right-0',\n    Right1: 'govuk-!-margin-right-1',\n    Right2: 'govuk-!-margin-right-2',\n    Right3: 'govuk-!-margin-right-3',\n    Right4: 'govuk-!-margin-right-4',\n    Right5: 'govuk-!-margin-right-5',\n    Right6: 'govuk-!-margin-right-6',\n    Right7: 'govuk-!-margin-right-7',\n    Right8: 'govuk-!-margin-right-8',\n    Right9: 'govuk-!-margin-right-9',\n\n    Bottom0: 'govuk-!-margin-bottom-0',\n    Bottom1: 'govuk-!-margin-bottom-1',\n    Bottom2: 'govuk-!-margin-bottom-2',\n    Bottom3: 'govuk-!-margin-bottom-3',\n    Bottom4: 'govuk-!-margin-bottom-4',\n    Bottom5: 'govuk-!-margin-bottom-5',\n    Bottom6: 'govuk-!-margin-bottom-6',\n    Bottom7: 'govuk-!-margin-bottom-7',\n    Bottom8: 'govuk-!-margin-bottom-8',\n    Bottom9: 'govuk-!-margin-bottom-9',\n\n    Left0: 'govuk-!-margin-left-0',\n    Left1: 'govuk-!-margin-left-1',\n    Left2: 'govuk-!-margin-left-2',\n    Left3: 'govuk-!-margin-left-3',\n    Left4: 'govuk-!-margin-left-4',\n    Left5: 'govuk-!-margin-left-5',\n    Left6: 'govuk-!-margin-left-6',\n    Left7: 'govuk-!-margin-left-7',\n    Left8: 'govuk-!-margin-left-8',\n    Left9: 'govuk-!-margin-left-9',\n  },\n\n  /**\n   * Responsive padding overrides (scale 0–9).\n   *\n   * Spacing scale: 0=0, 1=5px, 2=10px, 3=15px, 4=20px, 5=25px, 6=30px, 7=40px, 8=50px, 9=60px\n   * (values 4–9 are smaller on mobile).\n   *\n   * @see https://design-system.service.gov.uk/styles/spacing/#spacing-override-classes\n   */\n  Padding: {\n    All0: 'govuk-!-padding-0',\n    All1: 'govuk-!-padding-1',\n    All2: 'govuk-!-padding-2',\n    All3: 'govuk-!-padding-3',\n    All4: 'govuk-!-padding-4',\n    All5: 'govuk-!-padding-5',\n    All6: 'govuk-!-padding-6',\n    All7: 'govuk-!-padding-7',\n    All8: 'govuk-!-padding-8',\n    All9: 'govuk-!-padding-9',\n\n    Top0: 'govuk-!-padding-top-0',\n    Top1: 'govuk-!-padding-top-1',\n    Top2: 'govuk-!-padding-top-2',\n    Top3: 'govuk-!-padding-top-3',\n    Top4: 'govuk-!-padding-top-4',\n    Top5: 'govuk-!-padding-top-5',\n    Top6: 'govuk-!-padding-top-6',\n    Top7: 'govuk-!-padding-top-7',\n    Top8: 'govuk-!-padding-top-8',\n    Top9: 'govuk-!-padding-top-9',\n\n    Right0: 'govuk-!-padding-right-0',\n    Right1: 'govuk-!-padding-right-1',\n    Right2: 'govuk-!-padding-right-2',\n    Right3: 'govuk-!-padding-right-3',\n    Right4: 'govuk-!-padding-right-4',\n    Right5: 'govuk-!-padding-right-5',\n    Right6: 'govuk-!-padding-right-6',\n    Right7: 'govuk-!-padding-right-7',\n    Right8: 'govuk-!-padding-right-8',\n    Right9: 'govuk-!-padding-right-9',\n\n    Bottom0: 'govuk-!-padding-bottom-0',\n    Bottom1: 'govuk-!-padding-bottom-1',\n    Bottom2: 'govuk-!-padding-bottom-2',\n    Bottom3: 'govuk-!-padding-bottom-3',\n    Bottom4: 'govuk-!-padding-bottom-4',\n    Bottom5: 'govuk-!-padding-bottom-5',\n    Bottom6: 'govuk-!-padding-bottom-6',\n    Bottom7: 'govuk-!-padding-bottom-7',\n    Bottom8: 'govuk-!-padding-bottom-8',\n    Bottom9: 'govuk-!-padding-bottom-9',\n\n    Left0: 'govuk-!-padding-left-0',\n    Left1: 'govuk-!-padding-left-1',\n    Left2: 'govuk-!-padding-left-2',\n    Left3: 'govuk-!-padding-left-3',\n    Left4: 'govuk-!-padding-left-4',\n    Left5: 'govuk-!-padding-left-5',\n    Left6: 'govuk-!-padding-left-6',\n    Left7: 'govuk-!-padding-left-7',\n    Left8: 'govuk-!-padding-left-8',\n    Left9: 'govuk-!-padding-left-9',\n  },\n}\n","import { and, not, Condition, Self, validation } from '@ministryofjustice/hmpps-forge/core/authoring'\nimport type { ValidationExpr } from '@ministryofjustice/hmpps-forge/core/authoring'\n\ntype ValidationMessage = string | { message: string; submissionOnly?: boolean }\n\ninterface DateInputFullMessages {\n  empty: ValidationMessage\n  missingDay: ValidationMessage\n  missingMonth: ValidationMessage\n  missingYear: ValidationMessage\n  invalid: ValidationMessage\n  mustBePast?: ValidationMessage\n  mustBeFuture?: ValidationMessage\n}\n\nfunction toOptions(input: ValidationMessage): { message: string; submissionOnly?: boolean } {\n  if (typeof input === 'string') {\n    return { message: input }\n  }\n\n  return input\n}\n\nexport function DateInputFull(messages: DateInputFullMessages): ValidationExpr[] {\n  const validations: ValidationExpr[] = []\n\n  const empty = toOptions(messages.empty)\n\n  validations.push(\n    validation({\n      condition: not(\n        and(\n          Self().match(Condition.Object.IsObject()),\n          Self().not.match(Condition.Object.PropertyHasValue('day')),\n          Self().not.match(Condition.Object.PropertyHasValue('month')),\n          Self().not.match(Condition.Object.PropertyHasValue('year')),\n        ),\n      ),\n      message: empty.message,\n      submissionOnly: empty.submissionOnly ?? false,\n    }),\n  )\n\n  const fieldChecks = [\n    { key: 'missingDay' as const, field: 'day' },\n    { key: 'missingMonth' as const, field: 'month' },\n    { key: 'missingYear' as const, field: 'year' },\n  ]\n\n  for (const { key, field } of fieldChecks) {\n    const opts = toOptions(messages[key])\n\n    validations.push(\n      validation({\n        condition: not(\n          and(Self().match(Condition.Object.IsObject()), Self().not.match(Condition.Object.PropertyHasValue(field))),\n        ),\n        message: opts.message,\n        details: { field },\n        submissionOnly: opts.submissionOnly ?? false,\n      }),\n    )\n  }\n\n  const invalid = toOptions(messages.invalid)\n\n  validations.push(\n    validation({\n      condition: Self().match(Condition.Date.IsValid()),\n      message: invalid.message,\n      submissionOnly: invalid.submissionOnly ?? false,\n    }),\n  )\n\n  if (messages.mustBePast) {\n    const opts = toOptions(messages.mustBePast)\n\n    validations.push(\n      validation({\n        condition: Self().not.match(Condition.Date.IsFutureDate()),\n        message: opts.message,\n        submissionOnly: opts.submissionOnly ?? false,\n      }),\n    )\n  }\n\n  if (messages.mustBeFuture) {\n    const opts = toOptions(messages.mustBeFuture)\n\n    validations.push(\n      validation({\n        condition: Self().not.match(Condition.Date.IsPastDate()),\n        message: opts.message,\n        submissionOnly: opts.submissionOnly ?? false,\n      }),\n    )\n  }\n\n  return validations\n}\n","import { DateInputFull } from './validations/dateInputFull'\n\nexport const GovUKValidations = {\n  DateInputFull,\n}\n","interface ValidationError {\n  message: string\n  blockCode?: string\n  /** Document anchor of the failing block instance; falls back to blockCode when absent. */\n  anchor?: string\n}\n\ninterface ErrorListItem {\n  text: string\n  href?: string\n}\n\ninterface NunjucksGlobalContext {\n  ctx: {\n    fieldValidationErrors?: ValidationError[]\n    domainValidationErrors?: ValidationError[]\n  }\n}\n\nexport function getErrorSummaryList(this: NunjucksGlobalContext): ErrorListItem[] {\n  const fieldErrors = this.ctx.fieldValidationErrors ?? []\n  const domainErrors = this.ctx.domainValidationErrors ?? []\n  const seen = new Set<string>()\n\n  return (\n    [...domainErrors, ...fieldErrors]\n      .filter(error => {\n        const key = error.anchor ?? error.blockCode ?? error.message\n\n        return !seen.has(key) && seen.add(key)\n      })\n      .map(error => {\n        const anchor = error.anchor ?? error.blockCode\n\n        return {\n          text: error.message,\n          href: anchor ? `#${anchor}` : undefined,\n        }\n      })\n  )\n}\n","import type { Environment } from 'nunjucks'\nimport { getErrorSummaryList } from './toErrorList'\n\nexport function registerForgeGovUKComponentsGlobals(nunjucksEnv: Environment): void {\n  nunjucksEnv.addGlobal('getErrorSummaryList', getErrorSummaryList)\n}\n"],"mappings":";;;;;;;;;;;;;;;AA2BA,SAAgB,kBACd,SACA,SACgC;CAChC,QAAA,GAAOA,+CAAAA,UAAAA,CAAgD,SAAS,OAAO;AACzE;;;;;;;ACPA,SAAgB,wBACd,OAC+B;CAC/B,IAAI,OAAO,UAAU,UACnB,OAAO;CAGT,IAAI,UAAU,KAAA,KAAa,UAAU,IACnC;CAGF,OAAO,EAAE,MAAM,MAAM;AACvB;;;;;AAMA,SAAgB,uBACd,UACA,YAC8C;CAC9C,IAAI,UACF,OAAO;CAGT,IAAI,eAAe,KAAA,KAAa,eAAe,IAC7C;CAGF,OAAO,EACL,QAAQ,EACN,MAAM,WACR,EACF;AACF;AAEA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