import { __require as requireType } from "../../es-errors/type.js";
import { __require as requireIsObject } from "../../es-object-atoms/isObject.js";
import { __require as requirePropertyDescriptor } from "../helpers/records/property-descriptor.js";
import { __require as requireDefineOwnProperty } from "../helpers/DefineOwnProperty.js";
import { __require as requireFromPropertyDescriptor } from "./FromPropertyDescriptor.js";
import { __require as requireIsDataDescriptor } from "./IsDataDescriptor.js";
import { __require as requireIsPropertyKey } from "../helpers/isPropertyKey.js";
import { __require as requireSameValue } from "./SameValue.js";
import { __require as requireToPropertyDescriptor } from "./ToPropertyDescriptor.js";
var DefinePropertyOrThrow;
var hasRequiredDefinePropertyOrThrow;
function requireDefinePropertyOrThrow() {
  if (hasRequiredDefinePropertyOrThrow) return DefinePropertyOrThrow;
  hasRequiredDefinePropertyOrThrow = 1;
  var $TypeError = requireType();
  var isObject = requireIsObject();
  var isPropertyDescriptor = requirePropertyDescriptor();
  var DefineOwnProperty = requireDefineOwnProperty();
  var FromPropertyDescriptor = requireFromPropertyDescriptor();
  var IsDataDescriptor = requireIsDataDescriptor();
  var isPropertyKey = requireIsPropertyKey();
  var SameValue = requireSameValue();
  var ToPropertyDescriptor = requireToPropertyDescriptor();
  DefinePropertyOrThrow = function DefinePropertyOrThrow2(O, P, desc) {
    if (!isObject(O)) {
      throw new $TypeError("Assertion failed: Type(O) is not Object");
    }
    if (!isPropertyKey(P)) {
      throw new $TypeError("Assertion failed: P is not a Property Key");
    }
    var Desc = isPropertyDescriptor(desc) ? desc : ToPropertyDescriptor(desc);
    if (!isPropertyDescriptor(Desc)) {
      throw new $TypeError("Assertion failed: Desc is not a valid Property Descriptor");
    }
    return DefineOwnProperty(
      IsDataDescriptor,
      SameValue,
      FromPropertyDescriptor,
      O,
      P,
      Desc
    );
  };
  return DefinePropertyOrThrow;
}
export {
  requireDefinePropertyOrThrow as __require
};
