/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { FieldSemantics } from "#decoration/semantics/FieldSemantics.js";
import { CommandElement } from "#elements/CommandElement.js";
import { Decorator } from "#general";
import { CommandModel } from "#models/CommandModel.js";
function response(type) {
  return Decorator((_target, context) => {
    const requestSemantics = FieldSemantics.of(context);
    requestSemantics.modelType = CommandModel;
    const request = requestSemantics.mutableModel;
    const name = `${request.name}Response`;
    new CommandModel({
      name,
      id: request.id,
      parent: request.parent,
      direction: CommandElement.Direction.Response,
      operationalBase: type
    });
    request.response = name;
  });
}
export {
  response
};
//# sourceMappingURL=response.js.map
