export function restorePlaceholderAfterAllSelected(label) {
  if (!isAllLabel(label)) {
    return;
  }

  globalThis.requestAnimationFrame?.(() => {
    const activeElement = globalThis.document?.activeElement;
    if (activeElement && typeof activeElement.blur === "function") {
      activeElement.blur();
    }
  });
}

export function isAllLabel(label) {
  return String(label || "").trim().startsWith("全部");
}
