Creating pataa

Create Pataa on web integration steps:-

1) First you need to include creata pataa on web js url in your root index file head section.

<head>
  <meta charset="UTF-8">
  <title>Test Page</title>
   <!--Inject Remote Url in you enrty point page-->
  <script src="create-pataa.js"></script>
</head>

2) After this you need to open creata pataa on web on popup modal so for this you have to add create pataa selector in your modal popup body.

<div class="modal-body">
    <create-pataa></create-pataa>
</div>

3) Once you open the modal you will see the create pataa map for creating pataa. In first screen you will see cross icon, by this close icon you will get close event so you need to close you modal popup once you get that close event.

const createPataa = document.querySelector('create-pataa');
        // You will also get 'closeWindow' EventListener when you click on close icon in first screen then you need to close you modal popup of create pataa
createPataa.addEventListener('closeWindow', (event) => {
    console.log('Close window Clicked')
// Here you need to close your modal popuo
});

4) After selecting location on map & filling address with OTP verification user will redirect to pataa code congratulation screen. Where if he clicks on done button he will get a createPataaCode event, this event will get created pataa code.

const createPataa = document.querySelector('create-pataa');
    createPataa.addEventListener('createPataaCode', (event) => {
    document.getElementById('autofill').value = event.detail;
    console.log(event.detail)
});