class l{static resolveFocus(l,i=!0){var t;l&&(null===(t=l.focus)||void 0===t||t.call(l),l.setFocus?l.setFocus({selectText:i}):this.resolveFocusOnChild(l,i))}static resolveFocusOnChild(l,i=!0){var t,e;if(this.isGridCell(l)&&l.firstElementChild)return void this.resolveFocusOnChild(l.firstElementChild);if(!l||!l.classList.contains("hydrated"))return;const o=l.firstElementChild;((null==o?void 0:o.focus)||(null==o?void 0:o.setFocus))&&(null===(t=null==o?void 0:o.focus)||void 0===t||t.call(o),null===(e=null==o?void 0:o.setFocus)||void 0===e||e.call(o,{selectText:i}))}static isGridCell(l){var i;return"gridcell"===(null===(i=null==l?void 0:l.getAttribute)||void 0===i?void 0:i.call(l,"role"))}}export{l as F}