/** Filter bar pattern — populate demo table */

const columns = [
  { key: 'name',    label: 'Name' },
  { key: 'owner',   label: 'Owner' },
  { key: 'status',  label: 'Status', render: (val) => {
    const v = { Active: 'success', Draft: 'muted' }[val] || '';
    return `<badge-ui text="${val}" variant="${v}"></badge-ui>`;
  }},
  { key: 'updated', label: 'Updated' },
];

const data = [
  { name: 'Q4 roadmap',      owner: 'Alex Chen', status: 'Active', updated: '2h ago' },
  { name: 'Design review',   owner: 'Alex Chen', status: 'Active', updated: '5h ago' },
  { name: 'API v2 spec',     owner: 'Alex Chen', status: 'Active', updated: '1w ago' },
  { name: 'Brand guidelines',owner: 'Alex Chen', status: 'Draft',  updated: '3d ago' },
];

export default function setup(router) {
  const table = router.querySelector('#pat-filter-table');
  if (table) { table.columns = columns; table.data = data; }
}
