ENV['RCT_NEW_ARCH_ENABLED'] = '1'

# LaTeX math rendering is not yet enabled on macOS. RaTeX is now a vendored XCFramework
# (with a macOS slice), so the old use_frameworks!/SPM blocker no longer applies, but
# macOS math is not validated yet -- kept disabled here as a future follow-up.
ENV['ENRICHED_MARKDOWN_ENABLE_MATH'] = '0'

require 'pathname'

ws_dir = Pathname.new(__dir__)
ws_dir = ws_dir.parent until
  File.exist?("#{ws_dir}/node_modules/react-native-macos/scripts/react_native_pods.rb") ||
  ws_dir.expand_path.to_s == '/'
require "#{ws_dir}/node_modules/react-native-macos/scripts/react_native_pods.rb"

prepare_react_native_project!

target 'MacosExample-macOS' do
  platform :macos, '14.0'
  use_native_modules!

  use_react_native!(
    :path => '../node_modules/react-native-macos',
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  post_install do |installer|
    react_native_post_install(installer, :mac_catalyst_enabled => false)
  end
end
