       fontWeight: "350",
          letterSpacing: 0,
          lineHeight: "normal",
        },
        subtitle: {
          string_id: "aiwindow-firstrun-model-subtitle",
          fontSize: "17px",
          fontWeight: 320,
          color: BRAND_DARK_PURPLE,
        },
        tiles: {
          type: "single-select",
          selected: "none",
          autoTrigger: false,
          action: {
            picker: "<event>",
          },
          data: [
            {
              id: "model_1",
              label: {
                string_id: "aiwindow-firstrun-model-fast-label",
                fontSize: "20px",
                fontWeight: 613,
                color: BRAND_DARK_PURPLE,
              },
              icon: {
                background:
                  'center / contain no-repeat url("chrome://browser/content/aiwindow/assets/model-choice-1.svg")',
              },
              body: {
                string_id: "aiwindow-firstrun-model-fast-body",
                color: BRAND_DARK_PURPLE,
                fontSize: "15px",
                fontWeight: 320,
              },
              action: {
                type: "SET_PREF",
                data: {
                  pref: {
                    name: MODEL_PREF,
                    value: "1",
                  },
                },
              },
            },
            {
              id: "model_2",
              label: {
                string_id: "aiwindow-firstrun-model-allpurpose-label",
                fontSize: "20px",
                fontWeight: 613,
                color: BRAND_DARK_PURPLE,
              },
              icon: {
                background:
                  'center / contain no-repeat url("chrome://browser/content/aiwindow/assets/model-choice-2.svg")',
              },
              body: {
                string_id: "aiwindow-firstrun-model-allpurpose-body",
                color: BRAND_DARK_PURPLE,
                fontSize: "15px",
                fontWeight: 320,
              },
              action: {
                type: "SET_PREF",
                data: {
                  pref: {
                    name: MODEL_PREF,
                    value: "2",
                  },
                },
              },
            },
            {
              id: "model_3",
              label: {
                string_id: "aiwindow-firstrun-model-personal-label",
                fontSize: "20px",
                fontWeight: 613,
                color: BRAND_DARK_PURPLE,
              },
              icon: {
                background:
                  'center / contain no-repeat url("chrome://browser/content/aiwindow/assets/model-choice-3.svg")',
              },
              body: {
                string_id: "aiwindow-firstrun-model-personal-body",
                color: BRAND_DARK_PURPLE,
                fontSize: "15px",
                fontWeight: 320,
              },
              action: {
                type: "SET_PREF",
                data: {
                  pref: {
                    name: MODEL_PREF,
                    value: "3",
                  },
                },
              },
            },
          ],
        },
        primary_button: {
          label: {
            string_id: "aiwindow-firstrun-button",
          },
          action: {
            navigate: true,
          },
        },
      },
    },
  ],
};

function renderFirstRun() {
  const AWParent = new lazy.AboutWelcomeParent();
  const receive = name => data =>
    AWParent.onContentMessage(
      `AWPage:${name}`,
      data,
      topChromeWindow.gBrowser.selectedBrowser
    );

  window.AWGetFeatureConfig = () => AI_WINDOW_CONFIG;
  window.AWEvaluateScreenTargeting = screens => screens;
  window.AWGetSelectedTheme = () => ({});
  window.AWGetInstalledAddons = () => [];
  window.AWSendToParent = (name, data) => receive(name)(data);
  window.AWFinish = () => {
    window.location.href = lazy.AIWindow.newTabURL;
  };

  window.addEventListener(
    "unload",
    () => {
      AWParent.didDestroy();
    },
    { once: true }
  );

  const script = document.createElement("script");
  script.src = "chrome://browser/content/aboutwelcome/aboutwelcome.bundle.js";
  document.body.appendChild(script);
}

if (document.readyState === "loading") {
  document.addEventListener("DOMContentLoaded", renderFirstRun, { once: true });
} else {
  renderFirstRun();
}
PK