import {
  search
} from "./chunk-E5SPXKCI.js";
import "./chunk-Q5SPIJGE.js";
import "./chunk-GKYODP7W.js";
import "./chunk-IKPLMFAK.js";
import "./chunk-LNJIXYCU.js";
import "./chunk-DJLERI6R.js";
import {
  getWalletOrExit
} from "./chunk-QOYH6AOG.js";
import "./chunk-HFEYSQRZ.js";
import "./chunk-NPJV7AMV.js";
import "./chunk-LNQRIXFK.js";
import "./chunk-Y4VZACTC.js";
import "./chunk-EMQMCXIC.js";
import "./chunk-VDBUUHJF.js";
import "./chunk-ITCDZXBZ.js";
import "./chunk-QZBSRYSW.js";
import "./chunk-NROPRHIC.js";
import {
  errorResponse,
  outputAndExit,
  successResponse
} from "./chunk-7EBJ4BCH.js";
import "./chunk-C7KWYVS3.js";

// src/cli/commands/search.ts
var SURFACE = "cli:search";
var searchCommand = async (input) => {
  const wallets = await getWalletOrExit(input);
  const result = await search(
    { query: input.query },
    { surface: SURFACE, wallets, flags: input }
  );
  if (!result.success) {
    return outputAndExit(
      errorResponse({
        code: "GENERAL_ERROR",
        message: result.message,
        surface: SURFACE,
        cause: result.cause
      }),
      input
    );
  }
  return outputAndExit(successResponse(result), input);
};
export {
  searchCommand
};
//# sourceMappingURL=search-WTPHS4A3.js.map