import '@reddit/faceplate-ui/components/faceplate-form-helper-text.js';
import '@reddit/faceplate-ui/components/faceplate-textarea-input.js';
import { FieldConfig_Paragraph } from '@devvit/protos/types/devvit/ui/form_builder/v1alpha/field.js';
import { html, ifDefined } from '@reddit/faceplate-ui/templateRenderingStrategy/clientStrategy.js';
import { renderHelpText } from './renderHelpText.js';
export const renderParagraphField = (field) => {
    const { lineHeight, maxCharacters, placeholder } = field.fieldConfig?.paragraphConfig ?? FieldConfig_Paragraph.fromPartial({});
    return html `
    <faceplate-textarea-input
      id="${field.fieldId}"
      name="${field.fieldId}"
      class="py-xs border-0"
      value="${ifDefined(field.defaultValue?.stringValue)}"
      placeholder="${ifDefined(placeholder)}"
      rows="${ifDefined(lineHeight)}"
      maxlength="${ifDefined(maxCharacters)}"
      ?disabled="${field.disabled}"
      ?required="${field.required}"
      innerLabel
    >
      <span slot="label">${field.label}</span>
    </faceplate-textarea-input>
    ${renderHelpText(field.helpText)}
  `;
};
//# sourceMappingURL=renderParagraphField.js.map