import { env } from "@/env/server"

import Script from "next/script"

export default function AdobeScript() {
  return env.ADOBE_SCRIPT_SRC ? (
    <>
      <Script
        strategy="beforeInteractive"
        id="ensure-datalayer"
      >{`window.datalayer = window.datalayer || {}`}</Script>
      <Script src={env.ADOBE_SCRIPT_SRC} />
    </>
  ) : null
}
