// Copyright (C) The Arvados Authors. All rights reserved. // // SPDX-License-Identifier: AGPL-3.0 // import actions, { DetailsPanelAction } from "./details-panel-action"; // import { Resource, ResourceKind } from "../../models/resource"; // export interface ContextMenuState { // position: { // x: number; // y: number; // }, // resource: { // uuid: string; // kind: ResourceKind. // } // } // const initialState = { // item: null, // isOpened: false // }; // const reducer = (state: DetailsPanelState = initialState, action: DetailsPanelAction) => // actions.match(action, { // default: () => state, // LOAD_DETAILS: () => state, // LOAD_DETAILS_SUCCESS: ({ item }) => ({ ...state, item }), // TOGGLE_DETAILS_PANEL: () => ({ ...state, isOpened: !state.isOpened }) // }); // export default reducer;