import { type ChangeEvent, type PropsWithChildren, type ReactNode } from "react"; /** * Hook for handling residue selection change. */ export declare function useResidueChangeHandler({ selected, options, onChange, filter, }: { options: Residue[]; selected: ResidueSelection; onChange: (selected: ResidueSelection) => void; /** * The optional filter function to determine * if a residue should be included in a range selection. * * @param resno * @returns */ filter?: (resno: number) => boolean; }): (e: ChangeEvent, index: number, actpass: ActPass) => void; export interface Residue { resno: number; resname: string; seq: string; surface?: boolean; } export declare function FormDescription({ children }: PropsWithChildren): ReactNode; /** * Renders a checkboxes component for a residue. * * This component is used to display a checkbox for a residue, allowing the user to toggle its active and passive states. * */ export declare function ResidueCheckbox({ resno, resname, seq, showActive, showPassive, highlight, activeChecked, passiveChecked, neighbourChecked, activeDisabled, passiveDisabled, onHover, onActiveChange, onPassiveChange, theme, }: { resno: number; resname: string; seq: string; showActive: boolean; showPassive: boolean; /** * External component wants us to highlight this residue. */ highlight: boolean; activeChecked: boolean; passiveChecked: boolean; /** * If residue is selected as a neighbour the passive checkbox is checked. */ neighbourChecked: boolean; activeDisabled: boolean; passiveDisabled: boolean; /** * We want external component to know we are hovering */ onHover: () => void; onActiveChange: (event: ChangeEvent) => void; onPassiveChange: (event: ChangeEvent) => void; theme: "light" | "dark"; }): import("react/jsx-runtime").JSX.Element; export interface ResidueSelection { act: number[]; pass: number[]; } export interface ResidueNeighbourSelection extends ResidueSelection { neighbours: number[]; } export declare function ResiduesSelect({ options, selected, onChange, disabledPassive, disabledActive, showPassive, showActive, showNeighbours, onHover, highlight, theme, }: { options: Residue[]; selected: ResidueNeighbourSelection; onChange: (selected: ResidueSelection) => void; disabledPassive?: boolean; disabledActive?: boolean; showPassive?: boolean; showActive?: boolean; showNeighbours?: boolean; onHover: (resno: number | undefined) => void; highlight: number | undefined; theme: "light" | "dark"; }): import("react/jsx-runtime").JSX.Element; /** * Either active or passive. */ export type ActPass = "act" | "pass"; /** * Toggle to select if picking in 3D viewer should select active or passive residues. */ export declare function PickIn3D({ value, onChange, }: { value: ActPass; onChange: (value: ActPass) => void; }): import("react/jsx-runtime").JSX.Element; /** * Toggles the selection state of a residue number in either the "act" or "pass" list. * * @param resno - The residue number to toggle. * @param pick - The selection type, either "act" or "pass". * @param current - The current selection state containing "act" and "pass" lists. * @returns The new selection state with the residue number toggled in the appropriate list. */ export declare function toggleResidue(resno: number, pick: ActPass, current: ResidueSelection): ResidueSelection; //# sourceMappingURL=toggles.d.ts.map