/** Brave 搜尋 Threads 貼文用 query */
export function buildBraveThreadsKeywordQuery(keyword: string): string {
  const q = keyword.trim();
  if (q.startsWith("@")) {
    return `site:threads.com "${q}" OR site:www.threads.com "${q}"`;
  }
  return `site:threads.com "${q}" OR site:www.threads.com "${q}"`;
}

/** 負評／問題型補充查詢（high priority 品牌監控） */
export function buildBraveBrandMonitorQueries(brand: string): string[] {
  const b = brand.trim();
  if (!b) return [];
  const templates = [
    `"${b}" "問題"`,
    `"${b}" "推薦"`,
    `"${b}" "有人用過"`,
    `"${b}" "好用嗎"`,
    `"${b}" "雷"`,
    `"${b}" "踩雷"`,
    `"${b}" "不推"`,
  ];
  return templates.map((t) => `site:threads.com ${t} OR site:www.threads.com ${t}`);
}