/**
 * Drops `undefined`, `null`, and empty string entries.
 * Use when merging style objects so “unset” values from `style` do not override
 * computed values from component props.
 */
export const filterUnsetValues = (
  props: Record<string, unknown>,
): Record<string, unknown> => {
  const filtered: Record<string, unknown> = {};
  Object.keys(props).forEach(key => {
    const value = props[key];
    if (value !== undefined && value !== null && value !== "") {
      filtered[key] = value;
    }
  });
  return filtered;
};
