from facebook_business.adobjects.adcreative import AdCreative
from facebook_business.adobjects.campaign import Campaign

from FacebookCampaignsBuilder.Api.catalogs import objectives
from FacebookCampaignsBuilder.Api.catalogs.base import Base
from FacebookCampaignsBuilder.Api.catalogs.node import Node

_action = AdCreative.CallToActionType


class CTA(Base):
    awareness = Node(
        "AWARENESS",
        objectives.brand_awareness.with_children(
            _action.no_button,
            _action.message_page,
            _action.apply_now,
            _action.book_travel,
            _action.contact_us,
            _action.download,
            _action.get_quote,
            _action.get_showtimes,
            _action.learn_more,
            _action.listen_now,
            _action.see_more,
            _action.shop_now,
            _action.sign_up,
            _action.subscribe,
            _action.watch_more,
            _action.whatsapp_message,
        ),
        objectives.reach.with_children(
            _action.no_button,
            _action.message_page,
            _action.apply_now,
            _action.book_travel,
            _action.contact_us,
            _action.download,
            _action.get_quote,
            _action.get_showtimes,
            _action.learn_more,
            _action.listen_now,
            _action.see_more,
            _action.call,
            _action.shop_now,
            _action.get_directions,
            _action.sign_up,
            _action.subscribe,
            _action.watch_more,
            _action.whatsapp_message,
        ),
    )
    consideration = Node(
        "CONSIDERATION",
        objectives.website_traffic.with_children(
            _action.no_button,
            _action.apply_now,
            _action.book_travel,
            _action.contact_us,
            _action.download,
            _action.get_quote,
            _action.get_showtimes,
            _action.learn_more,
            _action.listen_now,
            _action.see_more,
            _action.shop_now,
            _action.sign_up,
            _action.subscribe,
            _action.watch_more,
            _action.whatsapp_message,
            _action.get_offer,
        ),
        objectives.engagement.with_children(
            objectives.post_likes.with_children(
                _action.no_button,
                _action.get_quote,
                _action.learn_more,
                _action.message_page,
                _action.shop_now,
                _action.whatsapp_message,
            ),
            objectives.page_likes.with_children(_action.like_page),
        ),
        objectives.video_views.with_children(
            _action.message_page,
            _action.book_travel,
            _action.download,
            _action.get_quote,
            _action.get_showtimes,
            _action.learn_more,
            _action.listen_now,
            _action.shop_now,
            _action.sign_up,
            _action.subscribe,
            _action.watch_more,
            _action.whatsapp_message,
        ),
        objectives.lead_generation.with_children(
            _action.apply_now,
            _action.book_travel,
            _action.download,
            _action.get_offer,
            _action.get_quote,
            _action.learn_more,
            _action.sign_up,
            _action.subscribe,
        ),
    )
    conversions = Node(
        Campaign.Objective.conversions,
        objectives.catalog_sales.with_children(
            _action.no_button,
            _action.open_link,
            _action.message_page,
            _action.book_travel,
            _action.download,
            _action.get_showtimes,
            _action.learn_more,
            _action.listen_now,
            _action.shop_now,
            _action.sign_up,
            _action.subscribe,
        ),
        objectives.conversions_leaf.with_children(
            _action.no_button,
            _action.play_game,
            _action.apply_now,
            _action.book_travel,
            _action.contact_us,
            _action.download,
            _action.get_quote,
            _action.get_showtimes,
            _action.learn_more,
            _action.listen_now,
            _action.see_more,
            _action.shop_now,
            _action.sign_up,
            _action.subscribe,
            _action.watch_more,
            _action.whatsapp_message,
            _action.get_offer,
        ),
    )
    app_activity = Node(
        "App Activity",
        objectives.app_traffic.with_children(
            _action.no_button,
            _action.open_link,
            _action.play_game,
            _action.use_app,
            _action.book_travel,
            _action.learn_more,
            _action.listen_now,
            _action.shop_now,
            _action.subscribe,
            _action.watch_more,
        ),
        objectives.app_installs.with_children(
            _action.no_button,
            _action.play_game,
            _action.book_travel,
            _action.download,
            _action.learn_more,
            _action.listen_now,
            _action.shop_now,
            _action.sign_up,
            _action.subscribe,
            _action.watch_more,
            _action.install_app,
            _action.use_app,
        ),
        objectives.conversions_leaf.with_children(
            _action.no_button,
            _action.play_game,
            _action.apply_now,
            _action.book_travel,
            _action.contact_us,
            _action.download,
            _action.get_quote,
            _action.get_showtimes,
            _action.learn_more,
            _action.listen_now,
            _action.see_more,
            _action.shop_now,
            _action.sign_up,
            _action.subscribe,
            _action.watch_more,
            _action.whatsapp_message,
            _action.get_offer,
        ),
    )
