import { FormLayout } from 'antd/es/form/Form';
import type { FormLabelAlign } from 'antd/es/form/interface';
import type { ColProps } from 'antd/es/grid/col';

export function formLayout(isMobile?: boolean): {
	layout?: FormLayout;
	labelAlign?: FormLabelAlign;
	labelWrap?: boolean;
	labelCol?: ColProps;
	wrapperCol?: ColProps;
	grid?: boolean;
} {
	return {
		layout: 'horizontal',
		labelAlign: 'right',
		labelCol: { span: isMobile ? 24 : 4 },
		wrapperCol: { span: isMobile ? 24 : 16 },
		grid: true,
	};
}
