import { useYithState } from "context/yith-context";
export const getManifestNote = (id) => {
    const state = useYithState();
    const { vault } = state;
    const manifest = vault.fromRef({
        id,
        type: "Manifest",
    });
    return {
        id: manifest.id,
        label: manifest.label,
        requiredStatement: manifest.requiredStatement,
        items: manifest.items,
    };
};
export const getCanvasNote = (id) => {
    const state = useYithState();
    const { vault } = state;
    const canvas = vault.fromRef({
        id,
        type: "Canvas",
    });
    return {
        id: canvas.id,
        label: canvas.label,
    };
};
export const getAnnotationNote = (annotation) => {
    if (!annotation.body.value)
        return null;
    return annotation.body.value;
};
//# sourceMappingURL=getNote.js.map