;
{
  try {
    let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
    n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "33f84cbd-b6a3-4488-a88d-0ffbd4b96b25", e._sentryDebugIdIdentifier = "sentry-dbid-33f84cbd-b6a3-4488-a88d-0ffbd4b96b25");
  } catch (e) {
  }
}
;
import { useQuery } from "@tanstack/preact-query";
import { b as useApiContext, k as httpGet } from "./StoreProvider-CqQrndhS.js";
const getBusinessLines = async (legalEntityId, baseUrl) => {
  return httpGet({
    baseUrl,
    path: `legalEntities/${legalEntityId}/businessLines`
  });
};
const useBusinessLines = (businessLineType, options) => {
  const { rootLegalEntityId, baseUrl } = useApiContext();
  return useQuery({
    queryKey: ["businessLines"],
    queryFn: () => getBusinessLines(rootLegalEntityId.value, baseUrl.value),
    select: (businessLines) => businessLines.filter((businessLine) => businessLineType.includes(businessLine.service)),
    ...options
  });
};
export {
  useBusinessLines as u
};
