CMS Magento Mastering Development

assign only one and leaf category per product in magento 2.3.3

I want that the only category checkbox selectable should be the leaf category that is the category checkbox without children in the current branch and only one category checkbox per product can be selected. The pseudo code is: if category has children then input checkbox tag is disabled if at least one category is selected […]