const OPENINARY_BASE = "https://media.ayris.tech/t/aydogan";

export const openinaryUrl = (path: string) => {
  if (!path || !path.startsWith("/images/")) return path;
  const parts = path.replace("/images/", "").split("/");
  const encodedParts = parts.map(part => encodeURIComponent(part));
  return `${OPENINARY_BASE}/${encodedParts.join("/")}`;
};
