#!/bin/bash


echo "Current directory $PWD"

if  command -v ea-php81 &> /dev/null; then
  cphp=ea-php81
else
  cphp=php
fi

echo Which channel to update?
read channel_id

cd $PWD
echo $($cphp artisan wa:create --phone_number=6583648016 --display_name='VitaHealth Singapore' --meta_bm_id=1308797246614843 --wa_api_token=EAAQ1EDFQVUUBOwRUv8gcqJfKmHafze3vg9kvPjquZBhy8aR1SqqTvYVsoZA7INhmRUCTJmZCes1ky12T01KlYhm7lUlTebJrcBGJcwZBjnXlhpnToZA5Oi4DwuXx3yRnJYsSit6Vje58ZA6UW2sxKpWdyFCuUeiHz5hw0pZBJMkoAlKrZCEdmO41mAt9fo2ovqdZAoAZDZD  --wa_phone_number_id=593110180550749 --wa_business_account_id=562464246944550 --es_domain=sg.vitalifesciences.health   --es_api_token=7EgxtL9UzZX8I3r4lNEXKZerIAlSSjXvEI4f1WdpgQjMeeVNqwXPQoRm652L --slack_webhook_url=https://hooks.slack.com/services/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  --notify_emails=enquiries@vitahealth.com.my,agas.ej@growthdesk.dev --brand_name='VitaHealth Singapore' --organization_name_chatbot=0 --faq_link=0 --tnc_link=0 --explore_brand_link=0 --cs_email=0 --cs_hotline=0 --specific_wf='Database\Seeders\VitaHealthSingaporeStandardJourney' --is_soft_delete=true)

echo $(yes | $cphp artisan import:channel-templates-from-csv storage/app/public/channel/$channel_id/vita-sg-en-questions-mar-26.csv $channel_id en)

echo $($cphp artisan wa:create --phone_number=6583648016 --display_name='VitaHealth Singapore' --meta_bm_id=1308797246614843 --wa_api_token=EAAQ1EDFQVUUBOwRUv8gcqJfKmHafze3vg9kvPjquZBhy8aR1SqqTvYVsoZA7INhmRUCTJmZCes1ky12T01KlYhm7lUlTebJrcBGJcwZBjnXlhpnToZA5Oi4DwuXx3yRnJYsSit6Vje58ZA6UW2sxKpWdyFCuUeiHz5hw0pZBJMkoAlKrZCEdmO41mAt9fo2ovqdZAoAZDZD  --wa_phone_number_id=593110180550749 --wa_business_account_id=562464246944550 --es_domain=sg.vitalifesciences.health   --es_api_token=7EgxtL9UzZX8I3r4lNEXKZerIAlSSjXvEI4f1WdpgQjMeeVNqwXPQoRm652L --slack_webhook_url=https://hooks.slack.com/services/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  --notify_emails=enquiries@vitahealth.com.my,agas.ej@growthdesk.dev --brand_name='VitaHealth Singapore' --organization_name_chatbot=0 --faq_link=0 --tnc_link=0 --explore_brand_link=0 --cs_email=0 --cs_hotline=0 --specific_wf='Database\Seeders\VitaHealthSingaporeRecommendProductJourney' --is_soft_delete=false)

echo $(yes | $cphp artisan import:permutations-from-csv storage/app/public/channel/$channel_id/vita-sg-en-replies-mar-26.csv $channel_id en)

echo $($cphp artisan wa:create --phone_number=6583648016 --display_name='VitaHealth Singapore' --meta_bm_id=1308797246614843 --wa_api_token=EAAQ1EDFQVUUBOwRUv8gcqJfKmHafze3vg9kvPjquZBhy8aR1SqqTvYVsoZA7INhmRUCTJmZCes1ky12T01KlYhm7lUlTebJrcBGJcwZBjnXlhpnToZA5Oi4DwuXx3yRnJYsSit6Vje58ZA6UW2sxKpWdyFCuUeiHz5hw0pZBJMkoAlKrZCEdmO41mAt9fo2ovqdZAoAZDZD  --wa_phone_number_id=593110180550749 --wa_business_account_id=562464246944550 --es_domain=sg.vitalifesciences.health   --es_api_token=7EgxtL9UzZX8I3r4lNEXKZerIAlSSjXvEI4f1WdpgQjMeeVNqwXPQoRm652L --slack_webhook_url=https://hooks.slack.com/services/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  --notify_emails=enquiries@vitahealth.com.my,agas.ej@growthdesk.dev --brand_name='VitaHealth Singapore' --organization_name_chatbot=0 --faq_link=0 --tnc_link=0 --explore_brand_link=0 --cs_email=0 --cs_hotline=0 --specific_wf='Database\Seeders\VitaHealthSingaporeMothersDaySeeder' --is_soft_delete=false)

echo $($cphp artisan wa:create --phone_number=6583648016 --display_name='VitaHealth Singapore' --meta_bm_id=1308797246614843 --wa_api_token=EAAQ1EDFQVUUBOwRUv8gcqJfKmHafze3vg9kvPjquZBhy8aR1SqqTvYVsoZA7INhmRUCTJmZCes1ky12T01KlYhm7lUlTebJrcBGJcwZBjnXlhpnToZA5Oi4DwuXx3yRnJYsSit6Vje58ZA6UW2sxKpWdyFCuUeiHz5hw0pZBJMkoAlKrZCEdmO41mAt9fo2ovqdZAoAZDZD  --wa_phone_number_id=593110180550749 --wa_business_account_id=562464246944550 --es_domain=sg.vitalifesciences.health   --es_api_token=7EgxtL9UzZX8I3r4lNEXKZerIAlSSjXvEI4f1WdpgQjMeeVNqwXPQoRm652L --slack_webhook_url=https://hooks.slack.com/services/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  --notify_emails=enquiries@vitahealth.com.my,agas.ej@growthdesk.dev --brand_name='VitaHealth Singapore' --organization_name_chatbot=0 --faq_link=0 --tnc_link=0 --explore_brand_link=0 --cs_email=0 --cs_hotline=0 --specific_wf='Database\Seeders\VitaHealthSingaporeGoldBarsCampaignJourney' --is_soft_delete=false)

#echo $($cphp artisan wa:create --phone_number=6583648016 --display_name='VitaHealth Singapore' --meta_bm_id=1308797246614843 --wa_api_token=EAAQ1EDFQVUUBOwRUv8gcqJfKmHafze3vg9kvPjquZBhy8aR1SqqTvYVsoZA7INhmRUCTJmZCes1ky12T01KlYhm7lUlTebJrcBGJcwZBjnXlhpnToZA5Oi4DwuXx3yRnJYsSit6Vje58ZA6UW2sxKpWdyFCuUeiHz5hw0pZBJMkoAlKrZCEdmO41mAt9fo2ovqdZAoAZDZD  --wa_phone_number_id=593110180550749 --wa_business_account_id=562464246944550 --es_domain=sg.vitalifesciences.health   --es_api_token=7EgxtL9UzZX8I3r4lNEXKZerIAlSSjXvEI4f1WdpgQjMeeVNqwXPQoRm652L --slack_webhook_url=https://hooks.slack.com/services/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  --notify_emails=enquiries@vitahealth.com.my,agas.ej@growthdesk.dev --brand_name='VitaHealth Singapore' --organization_name_chatbot=0 --faq_link=0 --tnc_link=0 --explore_brand_link=0 --cs_email=0 --cs_hotline=0 --specific_wf='Database\Seeders\VitaHealthSingaporeSpendAndWinLuckyDrawCampaignJourney' --is_soft_delete=false)
echo $($cphp artisan wa:create --phone_number=6583648016 --display_name='VitaHealth Singapore' --meta_bm_id=1308797246614843 --wa_api_token=EAAQ1EDFQVUUBOwRUv8gcqJfKmHafze3vg9kvPjquZBhy8aR1SqqTvYVsoZA7INhmRUCTJmZCes1ky12T01KlYhm7lUlTebJrcBGJcwZBjnXlhpnToZA5Oi4DwuXx3yRnJYsSit6Vje58ZA6UW2sxKpWdyFCuUeiHz5hw0pZBJMkoAlKrZCEdmO41mAt9fo2ovqdZAoAZDZD  --wa_phone_number_id=593110180550749 --wa_business_account_id=562464246944550 --es_domain=sg.vitalifesciences.health   --es_api_token=7EgxtL9UzZX8I3r4lNEXKZerIAlSSjXvEI4f1WdpgQjMeeVNqwXPQoRm652L --slack_webhook_url=https://hooks.slack.com/services/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  --notify_emails=enquiries@vitahealth.com.my,agas.ej@growthdesk.dev --brand_name='VitaHealth Singapore' --organization_name_chatbot=0 --faq_link=0 --tnc_link=0 --explore_brand_link=0 --cs_email=0 --cs_hotline=0 --specific_wf='Database\Seeders\VitaHealthSingaporeCNY2026Journey' --is_soft_delete=false)
