export default (
  entry: {
    method: string;
    details: {
      args: Array<{ name: string; type: string }>;
      documentation: string[];
    };
  },
  testnet: boolean
) => {
  let value = `### ${entry.method}(`;

  for (const { name, type } of entry.details.args) {
    value += `${name}: ${type},`;
  }

  value += "): SubmittableExtrinsic  \n\n";

  if (testnet) {
    value += "_Testnet only_  \n";
  }

  if (entry.details.documentation.length) {
    value += `${entry.details.documentation.join("  \n")}  \n\n`;
  }

  return value;
};
