<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
	id="juspay-godel-sdk-plugin"
	version="0.2.13">

  <name>Juspay-Safe</name>
  <description>A cordova wrapper over the Juspay Safe payments browser</description>

  <engines>
    <engine name="cordova" version=">=3.6.0" />
  </engines>

  <js-module src="plugin/www/JuspaySafeBrowser.js" name="JuspaySafeBrowser">
    <clobbers target="JuspaySafeBrowser" />
  </js-module>

  <js-module src="plugin/www/GodelTracker.js" name="GodelTracker">
    <clobbers target="GodelTracker" />
  </js-module>

  <platform name="android">
    <source-file src="plugin/src/android/GodelCordovaPluginImpl.java" target-dir="src/in/juspay/godel/hybrid/" />
    <framework src="plugin/src/android/_plugin-dependencies.gradle" custom="true" type="gradleReference" />
    <config-file target="config.xml" parent="/*">
      <feature name="JuspaySafeBrowser">
        <param name="android-package" value="in.juspay.godel.hybrid.GodelCordovaPluginImpl" />
      </feature>
    </config-file>

    <config-file target="AndroidManifest.xml" parent="/manifest/application">
      <activity
          android:theme="@style/Theme.AppCompat.Light"
          android:label="Processing your payment"
          android:name="in.juspay.godel.PaymentActivity"
          android:hardwareAccelerated="true"
          android:screenOrientation="portrait"
          android:windowSoftInputMode="adjustResize" />
    </config-file>

    <config-file target="AndroidManifest.xml" parent="/manifest">
      <uses-permission android:name="android.permission.INTERNET" />
      <uses-permission android:name="android.permission.READ_SMS" />
      <uses-permission android:name="android.permission.RECEIVE_SMS" />
      <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
      <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    </config-file>
  </platform>

  <platform name="ios">
    <podspec>
      <config>
        <source url="https://github.com/CocoaPods/Specs.git"/>
      </config>
      <pods>
        <pod name="JuspaySafeBrowser" spec="~> 0.1.58" />
      </pods>
    </podspec>
    <framework src="CoreTelephony.framework" />
    <framework src="JavaScriptCore.framework" />
    <framework src="SystemConfiguration.framework" />
    <config-file target="config.xml" parent="/*">
      <feature name="JuspaySafeBrowser">
        <param name="ios-package" value="JPSafeBrowser" />
      </feature>
      <feature name="GodelCordovaPluginImpl">
        <param name="ios-package" value="GodelTracker" />
      </feature>
    </config-file>
    <header-file src="plugin/src/ios/JPSafeBrowser.h" target-dir="JuspaySafeBrowser"/>
    <source-file src="plugin/src/ios/JPSafeBrowser.m" target-dir="JuspaySafeBrowser"/>
    <header-file src="plugin/src/ios/GodelTracker.h" target-dir="GodelCordovaPluginImpl"/>
    <source-file src="plugin/src/ios/GodelTracker.m" target-dir="GodelCordovaPluginImpl"/>
  </platform>
</plugin>
