function setLayout(modalName, layout, position) {
    htmlElements[modalName].layout.value = layout;
    setPosition(modalName, position, layout);
}
@param {'consentModal' | 'preferencesModal'} modalName
@param {string} layout