/** The shared circle and label for a pending read, independent of the data source. */ export const createLoadingState = (translate: (text: string) => string): HTMLDivElement => { const state = document.createElement('div'); state.className = 'fotogenic-ai-source-loading'; state.setAttribute('role', 'status'); const spinner = document.createElement('span'); spinner.className = 'fotogenic-ai-icon fotogenic-ai-icon--arrows-clockwise fotogenic-ai-icon--spin fotogenic-ai-icon--size-20'; spinner.setAttribute('aria-hidden', 'true'); const label = document.createElement('span'); label.textContent = translate('Loading'); state.append(spinner, label); return state; };