/**
 * Layout components never carry a visitor-supplied value (Title, Subtitle,
 * Blank, FreeText, Steps, Submit, Total, ...). Core now drops any client
 * value posted for one of these fields (see
 * `Epicformbuilder_Services_Submission_Merge::merge`), but submissions
 * stored before that fix can still carry a forged value for one of them, and
 * nothing here should ever render it just because no add-on happens to
 * define a Response/Summary part for the component.
 *
 * This list MUST mirror `Epicformbuilder_Models_Form_Json_Field::LAYOUT_FIELDS`
 * in `includes/models/form/json/class-epicformbuilder-models-form-json-field.php`
 * exactly — update both together.
 */
export const LAYOUT_COMPONENTS = [
  'Title',
  'Subtitle',
  'Blank',
  'FreeText',
  'Steps',
  'Submit',
  'Total',
] as const

export type LayoutComponent = typeof LAYOUT_COMPONENTS[number]

export const isLayoutComponent = (component: string): boolean =>
  (LAYOUT_COMPONENTS as readonly string[]).includes(component)
