import { defineStore } from 'pinia';

export type LayoutName = 'default' | 'cms-upload-header';

interface HeaderState {
  activeLayout: LayoutName;
}

export const useHeaderStateStore = defineStore('headerState', {
  state: (): HeaderState => ({
    activeLayout: 'default', // The application starts with the default layout
  }),

  actions: {
    setActiveLayout(layoutName: LayoutName) {
      this.activeLayout = layoutName;
    },
  },

  getters: {
    currentLayout: (state): LayoutName => state.activeLayout,
  },
});
