// This file was generated using gyb. Do not edit it directly. Edit // TableRowContent.swift.gyb instead. // swiftformat:options --allow-partial-wrapping true %{ maximum_column_count = 20 }% public protocol TableRowContent { associatedtype RowValue associatedtype RowContent: View var labels: [String] { get } func content(for row: RowValue) -> RowContent } public struct EmptyTableRowContent: TableRowContent { public typealias RowContent = EmptyView public var labels: [String] { [] } public init() {} public func content(for row: RowValue) -> EmptyView { EmptyView() } } %for i in range(1, maximum_column_count + 1): public struct TupleTableRowContent${i}< RowValue, ${", ".join("Content%d: View" % j for j in range(i))} >: TableRowContent { public typealias RowContent = TupleView${i}< ${", ".join("Content%d" % j for j in range(i))} > %for j in range(i): public var column${j}: TableColumn %end public var labels: [String] { [${", ".join("column%d.label" % j for j in range(i))}] } public init( ${", ".join("_ column%d: TableColumn" % (j, j) for j in range(i))} ) { %for j in range(i): self.column${j} = column${j} %end } public func content(for row: RowValue) -> RowContent { TupleView${i}( ${", ".join("column%d.content(row)" % j for j in range(i))} ) } } %end