"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Tutorial = Tutorial; const react_1 = __importDefault(require("react")); const react_native_1 = require("react-native"); const react_native_safe_area_context_1 = require("react-native-safe-area-context"); const exports_1 = require("../exports"); const getDevServer_1 = require("../getDevServer"); const Pressable_1 = require("../views/Pressable"); const canAutoTouchFile = process.env.EXPO_ROUTER_APP_ROOT != null; function createEntryFileAsync() { if (process.env.NODE_ENV === 'production') { // No dev server console.warn('createEntryFile() cannot be used in production'); return; } // Pings middleware in the Expo CLI dev server. return fetch((0, getDevServer_1.getDevServer)().url + '_expo/touch', { method: 'POST', body: JSON.stringify({ type: 'router_index' }), }); } function Tutorial() { react_1.default.useEffect(() => { if (react_native_1.Platform.OS === 'web') { // Reset the route on web so the initial route isn't a 404 after // the user has created the entry file. // This is useful for cases where you are testing the tutorial. // To test: touch the new file, then navigate to a missing route `/foobar`, then delete the app folder. // you should see the tutorial again and be able to create the entry file once more. if (typeof location !== 'undefined' && location.pathname !== '/') { location.replace('/'); } if (typeof window !== 'undefined' && typeof window.document !== 'undefined') { window.document.title = 'Welcome to Expo'; } } }, []); return ( Welcome to Expo Start by creating a file{react_native_1.Platform.OS !== 'web' ? '\n' : ' '}in the{' '} {getRootDir()} directory. {({ hovered, pressed }) => ( Learn more about Expo Router in the documentation. )} {canAutoTouchFile &&