sharepoint online – sorting by date for files and A-Z for folder

what I want to do is to create something like windows sorting.
in windows, you can have different sorting for folder and subfolder.
in each document library, we have some top-level folders I want this to be sorted based on A-Z
then when you go inside there are either files or folders. if there are only files I want them to be sorted by date. If it again folders I want them to be sorted A-Z

is it possible? If yes how?