Problem statement
A product listing whose filter controls are wired to nothing. A search field, a category select, and an in-stock checkbox must together decide which products from an in-memory array are shown, using Vanilla TypeScript and standard DOM APIs.
Demo
The page, styles, mock data, and toolbar markup are already scaffolded and wired. Only the initializeFilterToolbar function is missing — implement it in src/js/filterToolbar.ts so every test passes. Do not edit any other file.
What to implement
- Make each of the three controls filter the products that are shown: the search field by name, the select by category, and the checkbox by stock.
- Update the page immediately whenever any control changes.
- Show the products that satisfy every control at once, not just the one that changed last.
- Treat a control with no value applied as placing no restriction of its own, so clearing one filter leaves the others in effect.
- Show one row per product that is displayed, holding that product's name.
- Show how many products are displayed, keeping that number consistent with the rows on the page.
- Show the no-matches message only when nothing is displayed, with no rows on the page while it is visible.
- Leave the product array you were given unchanged, and leave the controls and the rest of the page as you found them.
- Everything shown must come from the product array you were given — nothing should be hardcoded.
