/**
 * Copyright (c) Double Symmetry GmbH
 * Commercial use requires a license. See https://rntp.dev/pricing
 */

import React from 'react';
import { Platform, requireNativeComponent, type ViewProps } from 'react-native';

type Props = ViewProps & { tintColor?: string };

const NativeAirPlayButton =
  Platform.OS === 'ios' ? requireNativeComponent<Props>('AirPlayButton') : null;

export function AirPlayButton(props: Props) {
  if (!NativeAirPlayButton) return null;
  return React.createElement(NativeAirPlayButton, props);
}
