Hook issue with 2 compoments in same page

I have 2 component in the same page
1 is an input field used for searches
The other one is a feedback form with 2 radio button

My input field is as follow

<input class="form-control mr-sm-2" type="text" name="search" id="search" placeholder="Search..." aria-label="Search" wire:model.debounce.1000ms="search" wire.key="keyword_search" wire:loading.attr="disabled">

After every search, the input field gets disabled as I get a laravel error if I don’t do it (I probably was triggering too many request so I also added a debounce) and I have added a hook to re-add the focus on the field once the search has completed

document.addEventListener("DOMContentLoaded", () => {
    Livewire.hook('message.processed', (message, component) => {
        document.getElementById("search").focus();
    })
});

Now, I have added another component to rate my pages. but of course, every time a page is rated, the hook is triggered and the focus is given to the search field and that’s an issue. How can I prevent this from happening?

Is there a way to target a hooks to a specific component?

Are you using the latest version of Livewire:
yes