export const getActiveProperties = (position: { top: number | "auto"; left: number | "auto"; right: number | "auto"; bottom: number | "auto"; }) => { let activeProps: ["top", "left"] | ["bottom", "right"] = ["top", "left"]; // Default to top-left if ( typeof position.bottom !== "string" && typeof position.right !== "string" ) { activeProps = ["bottom", "right"]; } return activeProps; };