import { Constants } from '@graphprotocol/hypergraph';
import * as Option from 'effect/Option';
import * as SchemaAST from 'effect/SchemaAST';
export const convertPropertyValue = (property, type) => {
  const propertyType = SchemaAST.getAnnotation(Constants.PropertyTypeSymbol)(type);
  if (Option.isSome(propertyType)) {
    if (propertyType.value === 'string') {
      return property.string;
    }
    if (propertyType.value === 'boolean') {
      return Boolean(property.boolean);
    }
    if (propertyType.value === 'point') {
      return property.point;
    }
    if (propertyType.value === 'number') {
      return Number(property.number);
    }
    if (propertyType.value === 'date') {
      return property.time;
    }
  }
};
//# sourceMappingURL=convert-property-value.js.map