/*! * ======================================================================== * @rzl-zone/next-kit * ------------------------------------------------------------------------ * Version: `0.10.4` * Author: `Rizalvin Dwiky ` * Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/next-kit` * ======================================================================== */ import { t as ReadonlyURLSearchParams } from "../search-params-BRPHsSLA.js"; /** ------------------------------------------------------------------- * * ***This function lets you read the current URL's pathname.*** * ------------------------------------------------------------------- * * ***`⚠️ Warning: Currently is not support with turbopack flag mode !!!`*** * ------------------------------------------------------------------- * @example * ```ts * import { getPathname } from "@rzl-zone/next-kit/extra/pathname"; * * type LayoutProps = Readonly<{ children: React.ReactNode }>; * export default async function Layout({ children }: LayoutProps) { * const pathname = await getPathname(); * // ➔ returns "/dashboard" on /dashboard?foo=bar * * return ( * //... * ); * }; * ``` */ declare function getPathname(): Promise; /** ------------------------------------------------------------------- * * ***This function lets you *read* the current URL's search parameters.*** * ------------------------------------------------------------------- * * ***`⚠️ Warning: Currently is not support with turbopack flag mode !!!`*** * ------------------------------------------------------------------- * **Learn more about [`URLSearchParams` on MDN](https://developer.mozilla.org/docs/Web/API/URLSearchParams).** * * @example * ```ts * import { getSearchParams } from "@rzl-zone/next-kit/extra/pathname"; * * type LayoutProps = Readonly<{ children: React.ReactNode }>; * export default async function Layout({ children }: LayoutProps) { * const params = await getSearchParams(); * params.get("foo"); * // ➔ returns "bar" when ?foo=bar * * return ( * //... * ); * }; * ``` */ declare function getSearchParams(): Promise; export { getPathname, getSearchParams };