<?php
$primary_color = get_theme_mod( 'primary_color' );
if ( $primary_color ) {
    set_theme_mod( 'primary_bg_color', $primary_color );
}
remove_theme_mod( 'primary_color' );

Kirki::add_field( 'author_portfolio_config', [
	'type'        => 'color',
	'settings'    => 'primary_bg_color',
	'label'       => __( 'Primary Background Color', 'author-portfolio' ),
	'section'     => 'colors',
	'default'     => '#fb4747',
	'transport'   => 'auto',
	'output' => array(
		array(
			'element'  => '.author-portfolio-standard-post__overlay-category span.cat-links a, .author-portfolio-standard-post__post-meta span.cat-links a, .widget .tagcloud a, blockquote.wp-block-quote.is-style-red-qoute, .scrooltotop a:hover,.scrooltotop a, .discover-me-button a, .woocommerce .woocommerce-pagination .page-numbers li a, .woocommerce .woocommerce-pagination .page-numbers li span, .woocommerce ul.products li.product .onsale, .woocommerce span.onsale, .woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt, .woocommerce table.shop_table tr td.product-remove a, .woocommerce-info, .woocommerce-noreviews, p.no-comments, .author-portfolio-single-page .entry-footer a,nav.woocommerce-MyAccount-navigation ul li a, .rs-wp-themes-cookies-banner-area .cookies_accept_button, .widget_search button, aside.widget-area .widget .widget-title:before, .pagination li.page-item a, .pagination li.page-item span, button, input[type="button"], input[type="reset"], input[type="submit"], section.shop-page-main-block .related.products>h2:before, .author-portfolio-standard-post .author-portfolio-standard-post__full-summery .page-links a, .footer-content .widget h2.widget-title.footer-title:before, .footer-social-links-wrapper a:hover, .woocommerce ul.products li.product .button, .rswpthemes-book-loop-content-wrapper .book-buy-btn a.rswpthemes-book-buy-now-button, .rswpthemes-book-list-widget-area-inner .book-image .book-view-button a:hover, .author-portfolio-standard-post .author-portfolio-standard-post__full-summery .taxonomy-category.wp-block-post-terms a',
			'property' => 'background-color',
		),
		array(
			'element'  => '#cssmenu ul ul li:first-child',
			'property' => 'border-top-color',
		),
		array(
			'element'  => '.widget_search button',
			'property' => 'border-color',
		),
		array(
			'element'  => '.author-portfolio-standard-post__full-summery blockquote',
			'property' => 'border-left-color',
		),
	),
] );

Kirki::add_field( 'author_portfolio_config', [
	'type'        => 'color',
	'settings'    => 'primary_text_color',
	'label'       => __( 'Text Color That Has Primary Background', 'author-portfolio' ),
	'section'     => 'colors',
	'transport'   => 'auto',
	'default'     => '#ffffff',
	'output' => array(
		array(
			'element'  => '.author-portfolio-standard-post__overlay-category span.cat-links a, .author-portfolio-standard-post__post-meta span.cat-links a, .widget .tagcloud a, blockquote.wp-block-quote.is-style-red-qoute, .scrooltotop a:hover,.scrooltotop a, .discover-me-button a, .woocommerce .woocommerce-pagination .page-numbers li a, .woocommerce .woocommerce-pagination .page-numbers li span, .woocommerce ul.products li.product .onsale, .woocommerce span.onsale, .woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt, .woocommerce table.shop_table tr td.product-remove a, .woocommerce-info, .woocommerce-noreviews, p.no-comments, .author-portfolio-single-page .entry-footer a,nav.woocommerce-MyAccount-navigation ul li a, .rs-wp-themes-cookies-banner-area .cookies_accept_button, .widget_search button, aside.widget-area .widget .widget-title:before, .pagination li.page-item a, .pagination li.page-item span, button, input[type="button"], input[type="reset"], input[type="submit"], section.shop-page-main-block .related.products>h2:before, .author-portfolio-standard-post .author-portfolio-standard-post__full-summery .page-links a, .footer-content .widget h2.widget-title.footer-title:before, .footer-social-links-wrapper a:hover, .woocommerce ul.products li.product .button, .rswpthemes-book-loop-content-wrapper .book-buy-btn a.rswpthemes-book-buy-now-button, .rswpthemes-book-list-widget-area-inner .book-image .book-view-button a:hover, .author-portfolio-standard-post .author-portfolio-standard-post__full-summery .taxonomy-category.wp-block-post-terms a',
			'property' => 'color',
		),
		array(
			'element'  => '.author-portfolio-standard-post__blog-meta>span.posted-on i.line',
			'property' => 'background-color',
		),
	),
] );

Kirki::add_field( 'author_portfolio_config', [
	'type'        => 'color',
	'settings'    => 'secondary_text_color',
	'label'       => __( 'Text Color', 'author-portfolio' ),
	'section'     => 'colors',
	'transport'   => 'auto',
	'default'     => '#fb4747',
	'output' => array(
		array(
			'element'  => '.rswpthemes-book-loop-content-wrapper .book-title a:hover, .rswpthemes-book-loop-content-wrapper .book-author a:hover, .author-portfolio-standard-post__blog-meta>span .fa, .author-portfolio-standard-post__blog-meta>span.posted_by span.post-author-image i, .rswpthemes-book-list-widget-area-inner .book-author h4 a:hover, .rswpthemes-book-list-widget-area-inner .book-name h2 a:hover, .post-details-page .author-portfolio-standard-post__blog-meta .fa, .author-portfolio-standard-post .author-portfolio-standard-post__full-summery a, .author-portfolio-standard-post.sticky:before,.widget-area .widget.widget_rss a.rsswidget,.widget ul li a:hover,.widget ul li a:visited,.widget ul li a:focus,.widget ul li a:active,.widget ol li a:hover,.widget ol li a:visited,.widget ol li a:focus,.widget ol li a:active,a:hover,a:focus,a:active,span.opacity-none:before,header.archive-page-header span,.woocommerce ul.products li.product .price,.woocommerce div.product p.price,.woocommerce div.product span.price,.woocommerce .product_meta>* a,.woocommerce-account .woocommerce-MyAccount-content a,.author-portfolio-standard-post_post-meta .tags-links a:hover,.rswpthemes-book-list-widget-area-inner .book-price,p.logged-in-as a,.rs-author-info-box_social_link .social-link a:hover,.books-loop-item .loop-book-content-wrapper .book-price,.book-info-wrapper>div.book-price h5,.rswpthemes-book-list-widget-area-inner .book-image .book-view-button a:hover, .author-portfolio-standard-post.sticky:before, .author-portfolio-standard-post__post-title h2 a:hover',
			'property' => 'color',
		),
	),
] );