export const convertFullItemToStub = (item) => {
    return {
        id: item.id,
        name: item.name,
        language: item.language,
        version: item.version,
        templateId: item.templateId,
        templateName: item.templateName,
        icon: item.icon,
        largeIcon: item.largeIcon,
        path: item.path,
        idPath: item.idPath,
        database: "master",
        parentId: item.parentId,
        hasLayout: item.hasLayout,
        hasChildren: item.hasChildren,
        versions: item.versions,
        canDelete: item.canDelete,
        canCreate: item.canCreate,
        canRename: item.canRename,
        canWrite: item.canWriteItem,
        thumbnail: item.thumbnail,
    };
};
export const convertStubToFullItem = (stub) => {
    return {
        ...stub,
        descriptor: {
            id: stub.id,
            language: stub.language,
            version: stub.version,
            name: stub.name,
        },
        largeIcon: stub.largeIcon || stub.icon,
        thumbnail: stub.thumbnail || "",
        fields: [],
        canWriteItem: stub.canWrite || false,
        canWriteLanguage: stub.canWrite || false,
        canWriteWorkflow: false,
        canDelete: stub.canDelete || false,
        canCreate: stub.canCreate || false,
        canRename: stub.canRename || false,
        workflowState: "",
        isFinalState: false,
        hasLock: false,
        canLock: false,
        lockedBy: "",
        isInheritedFromMasterLanguage: false,
        mainItemId: undefined,
        masterLanguages: [],
        translations: [],
    };
};
//# sourceMappingURL=itemConverters.js.map