2023-06-23 10:52:03 +00:00
|
|
|
import {createContext} from "preact";
|
|
|
|
import {type Feature} from "../storage/common.js";
|
2022-02-23 13:52:06 +00:00
|
|
|
|
|
|
|
type AppContextValues = {
|
2023-06-23 10:52:03 +00:00
|
|
|
setActiveFeature: (feature: Feature) => void;
|
|
|
|
toggleFeature: (feature: Feature) => void;
|
2022-02-23 13:52:06 +00:00
|
|
|
};
|
|
|
|
|
2023-06-23 10:52:03 +00:00
|
|
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
2022-02-23 13:52:06 +00:00
|
|
|
export const AppContext = createContext<AppContextValues>(null!);
|