/**
 * @license
 * Copyright 2025-2026 Open Home Foundation
 * SPDX-License-Identifier: Apache-2.0
 */
function asObject(value) {
  return typeof value === "object" && value !== null ? value : null;
}
function pickNumber(obj, ...keys) {
  for (const k of keys) {
    const v = obj[k];
    if (typeof v === "number" && Number.isFinite(v)) return v;
  }
  return null;
}
function pickString(obj, key) {
  const v = obj[key];
  return typeof v === "string" ? v : null;
}
function extractAttributeValue(attributesData) {
  const obj = asObject(attributesData);
  if (!obj) return attributesData;
  const vals = Object.values(obj);
  return vals.length > 0 ? vals[0] : null;
}
function extractAttributeList(attributesData) {
  const val = extractAttributeValue(attributesData);
  return Array.isArray(val) ? val : [];
}
export {
  asObject,
  extractAttributeList,
  extractAttributeValue,
  pickNumber,
  pickString
};
//# sourceMappingURL=attribute-shapes.js.map
