{% set tableColumnCount = field.tableLayout|length %}

{{ field.render({
    tableAttributes: {
        table: { class: "table min-w-full" },
        row: { class: "table-row" },
        column: { class: [
            tableColumnCount in [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] ? "w-1/" ~ tableColumnCount,
            tableColumnCount == 1 ? "w-full",
            "table-col text-sm/6 pb-1"
        ] },
        label: { class: "text-left" },
        input: { class: [ field.attributes.input.get("class"), "w-11/12 block" ] },
        textarea: { class: [ field.attributes.input.get("class"), "w-11/12 block" ] },
        dropdown: { class: [ field.attributes.input.get("class"), "w-11/12 block size-9" ] },
        checkbox: { class: "bg-white/5 rounded-sm appearance-none size-4 !px-0 rounded-full border border-white/10 checked:border-indigo-500 checked:bg-indigo-500 indeterminate:border-indigo-500 indeterminate:bg-indigo-500 !focus-visible:outline-0 !focus-visible:outline-offset-0 relative flex items-center justify-center checked:before:content-['✔'] checked:before:text-white checked:before:text-xs" },
        radios: { class: "bg-white/5 relative appearance-none size-4 !px-0 mr-2 w-4 h-4 !rounded-full border border-white/10 before:absolute before:inset-1 before:rounded-full before:bg-white not-checked:before:hidden checked:border-indigo-500 checked:bg-indigo-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-500 freeform-table-radios" },
        removeButton: { class: "text-sm text-indigo-500 hover:text-red-700" },
        addButton: { class: "block rounded-md bg-indigo-500 px-3 py-1 text-center text-sm font-medium text-white hover:bg-indigo-400 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-500" },
    },
}) }}
