/* eslint-disable @typescript-eslint/ban-types */
import React from 'react';
import { PHXInput } from '../Input/Input';
import { classNames } from '../types';
import { PHXTextarea } from '../Textarea';
export function PHXFormLayout({ className, list, numberOfInputInRow, textArea, row }) {
    const numberOfInput = classNames(numberOfInputInRow === 1 && 'md:grid-cols-1', numberOfInputInRow === 2 && 'md:grid-cols-2', numberOfInputInRow === 3 && 'md:grid-cols-3', numberOfInputInRow === 4 && 'md:grid-cols-4', numberOfInputInRow === 5 && 'md:grid-cols-5');
    return (React.createElement("div", { className: className },
        React.createElement("div", { className: `grid gap-y-3 gap-x-5 ${numberOfInput}` }, list.map((item, index) => (React.createElement(React.Fragment, null, textArea ? (React.createElement("div", { key: index },
            React.createElement(PHXTextarea, { rows: row, key: index, label: item.label, register: item.register, helpText: item.helpText, error: item.error, errorMessageCustom: item.errorMessageCustom, errorType: item.errorType, ...item.rest }))) : (React.createElement("div", { key: index },
            React.createElement(PHXInput, { key: index, label: item.label, register: item.register, helpText: item.helpText, error: item.error, errorMessageCustom: item.errorMessageCustom, errorType: item.errorType, ...item.rest })))))))));
}
//# sourceMappingURL=FormLayout.js.map