We are developing a custom lighting web component where we have a requirement to show a set of custom action buttons. The same set of custom buttons are also added to the page layout of the custom object. We want show the buttons in the lightning web component only if those are added to the page layout. In other words - if the user removes any of the custom buttons from the page layout those options should be hidden from the lighting web component action button list as well.
So I am trying to see if I can access the page layout and its associted properties using Apex.
Could you please suggest if you have solved these type of requirements in any of your projects?