import { createContext, useContext } from 'react';
import { getTitleShape as getTitleShapeFromPrefs, updateTitleShape as updateTitleShapeInPrefs, } from '../config/preferences.js';
export const TitleShapeContext = createContext(null);
export function useTitleShape() {
    const context = useContext(TitleShapeContext);
    if (!context) {
        throw new Error('useTitleShape must be used within a TitleShapeProvider');
    }
    return context;
}
/**
 * Helper function to get initial title shape from preferences
 */
export function getInitialTitleShape() {
    return getTitleShapeFromPrefs() || 'pill';
}
/**
 * Helper function to update title shape in both context and preferences
 */
export function updateTitleShape(shape) {
    updateTitleShapeInPrefs(shape);
}
//# sourceMappingURL=useTitleShape.js.map