## User Story:
As a user I want to be able to favourite templates that I use frequently, so that I can recall them easily.
## Acceptance criteria:
* A new OOUI template search widget has been created in #TemplateData.
* The new widget is in use in both #VisualEditor and #TemplateWizard.
* The search experience in the new widget is the same as in both previous versions (both with and without #cirrussearch).
* An editor can favourite a template from a new icon in the search results dropdown list.
## Details for QA:
* Test with all possible permutations of the above extensions being installed or not.
* Favourites are saved as a user preference.
## Designs:
* https://www.figma.com/design/QWD6oDEz9NMEnF2ppVc4Xq/Template-recall-and-discovery?node-id=765-5322&node-type=canvas&t=yN2wqePQH3we7dMn-0
## Subtasks:
The subtasks should be done in roughly the following order:
* T377313: Create new OOUI widget in TemplateData for searching templates, with the same functionality as the existing VE template search (i.e. CirrusSearch if available, prefix search if not)
* T377453 Add new feature flag to TemplateData `$wgTemplateDataFavouriteTemplates = false`
* T377416: Add new widget to TemplateWizard, behind the above flag
* T377417: Add new widget to VE, also behind the same feature flag
* T377709 Add favourite icon to search results dropdown list
* Save favourite when clicking the icon (sent API request, and update local list)
* T377455: Load favourites data from API, and set icon state
* T377729: Use SaveUserOptions hook to limit number of favourites (to 50) and prevent duplicates
* Handle error in saving (design to be determined; probably a bubble notification)
* T377460: Disable favourite icon if the max has been reached
* T377520: Reenable favourite icon after unfavouriting template
* T377466: Show bubble notification after saving favourite