import { FormFieldType } from '@devvit/protos';
import { html, repeat } from '@reddit/faceplate-ui/templateRenderingStrategy/clientStrategy.js';
import { choose } from 'lit/directives/choose.js';
import { renderBooleanField } from './renderBooleanField.js';
import { renderGroupField } from './renderGroupField.js';
import { renderImageField } from './renderImageField.js';
import { renderNumberField } from './renderNumberField.js';
import { renderParagraphField } from './renderParagraphField.js';
import { renderSelectionField } from './renderSelectionField.js';
import { renderStringField } from './renderStringField.js';
const renderFormField = (field) => html `
  ${choose(field.fieldType, [
    [FormFieldType.STRING, () => renderStringField(field)],
    [FormFieldType.IMAGE, () => renderImageField(field)],
    [FormFieldType.PARAGRAPH, () => renderParagraphField(field)],
    [FormFieldType.NUMBER, () => renderNumberField(field)],
    [FormFieldType.BOOLEAN, () => renderBooleanField(field)],
    // [FormFieldType.LIST, () => renderListField(field)],
    [FormFieldType.SELECTION, () => renderSelectionField(field)],
    [FormFieldType.GROUP, () => renderGroupField(field, renderFormFields)],
])}
`;
export const renderFormFields = (fields) => {
    return html `${repeat(fields, (field) => renderFormField(field))}`;
};
//# sourceMappingURL=renderFormFields.js.map