--- // Transfer initializes from `data-bs-toggle="transfer"` (tabler.js, core/js/src/transfer.ts). // The rows live in the markup; the plugin moves them and keeps the `` that carries the value in a form */ name?: string /** headers of the two panels */ titles?: [string, string] /** search field in each panel header */ search?: boolean /** select-all checkbox in each panel header */ selectAll?: boolean /** up / down buttons to reorder the target list */ reorder?: boolean /** data-bs-counter-template: `{checked}` and `{total}` are replaced (default: `{checked} / {total}`) */ counterTemplate?: string /** placeholder of the search fields */ searchPlaceholder?: string /** height of the lists, any CSS length */ height?: string class?: string /** remaining attributes (id, data-*, …) are forwarded to the root element */ [key: string]: unknown } const { items, selected = [], name, titles = ['Available', 'Selected'], search = false, selectAll = true, reorder = false, counterTemplate, searchPlaceholder = 'Search…', height, class: className, ...rest } = Astro.props const sides = [ { side: 'source', title: titles[0], items: items.filter((item) => !selected.includes(item.value)) }, { side: 'target', title: titles[1], items: items.filter((item) => selected.includes(item.value)) }, ] const style = height ? `--tblr-transfer-list-height: ${height}` : undefined ---
{ sides.map(({ side, title, items: rows }, index) => ( <>
{selectAll ? ( ) : (

{title}

)}
{search && (
)}
{rows.map((item) => (
{item.label}
))}
{index === 0 && (
{reorder && ( <> )}
)} )) }