<?php
/**
 * Register Custom Block Styles
 */
function buba_blocks_register_block_patterns() {
    if ( function_exists( 'register_block_pattern' ) ) {
        /**
         * Register block patterns
         */
        register_block_pattern(
            'buba-blocks/hero',
            array(
                'title'   => __( 'Hero section', 'buba-blocks' ),
                'content' => "<!-- wp:buba-blocks/section {\"typeWidth\":\"full\",\"spacing\":{\"padding\":{\"top\":{\"typeSpacing\":\"custom\",\"number\":\"130\",\"label\":\"Padding Top\"},\"right\":{\"typeSpacing\":\"custom\",\"number\":\"130\",\"label\":\"Padding Right\"},\"bottom\":{\"typeSpacing\":\"custom\",\"number\":\"50\",\"label\":\"Padding Bottom\"},\"left\":{\"typeSpacing\":\"custom\",\"number\":\"80\",\"label\":\"Padding Left\"}},\"margin\":{\"top\":{\"typeSpacing\":\"none\",\"number\":0,\"label\":\"Margin Top\"},\"right\":{\"typeSpacing\":\"auto\",\"number\":0,\"label\":\"Margin Right\"},\"bottom\":{\"typeSpacing\":\"none\",\"number\":0,\"label\":\"Margin Bottom\"},\"left\":{\"typeSpacing\":\"auto\",\"number\":0,\"label\":\"Margin Left\"}}},\"desktopHeight\":\"0px\",\"customGradient\":\"linear-gradient(85deg,rgb(235,148,64) 0%,rgb(250,66,89) 29%,rgb(204,76,194) 68%,rgb(113,64,255) 100%)\",\"showScrollDown\":true,\"leftPositionScrollDown\":\"45%\"} -->\n<div class=\"wp-block-buba-blocks-section buba-section width-full buba-padding-top-custom buba-padding-right-custom buba-padding-bottom-custom buba-padding-left-custom buba-margin-top-none buba-margin-right-auto buba-margin-bottom-none buba-margin-left-auto buba-has-background-dim\" style=\"min-height:0px;padding-top:130px;padding-right:130px;padding-bottom:50px;padding-left:80px;background-size:cover;border-style:solid;border-width:1px;border-color:#000;border-radius:0\"><span aria-hidden=\"true\" class=\"buba-section__gradient-background\" style=\"background:linear-gradient(85deg,rgb(235,148,64) 0%,rgb(250,66,89) 29%,rgb(204,76,194) 68%,rgb(113,64,255) 100%)\"></span><div class=\"buba-section-inside\"><!-- wp:buba-blocks/container {\"width\":1240} -->\n<div class=\"wp-block-buba-blocks-container buba-container buba-padding-top-none buba-padding-right-none buba-padding-bottom-none buba-padding-left-none buba-margin-top-none buba-margin-bottom-none\" style=\"max-width:1240px;background-size:cover\"><div class=\"buba-container-inside\"><!-- wp:columns -->\n<div class=\"wp-block-columns\"><!-- wp:column {\"verticalAlignment\":\"center\"} -->\n<div class=\"wp-block-column is-vertically-aligned-center\"><!-- wp:heading {\"level\":3,\"textColor\":\"white\"} -->\n<h3 class=\"has-white-color has-text-color\">Simple hero block</h3>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph {\"textColor\":\"white\"} -->\n<p class=\"has-white-color has-text-color\">Synchronize customer experience with a goal to target the low hanging fruit. Inform growth hacking and above all, surprise and delight.</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:buttons -->\n<div class=\"wp-block-buttons\"><!-- wp:button {\"backgroundColor\":\"white\",\"style\":{\"color\":{\"text\":\"#2a2241\"},\"border\":{\"radius\":50}},\"className\":\"is-style-fill\"} -->\n<div class=\"wp-block-button is-style-fill\"><a class=\"wp-block-button__link has-white-background-color has-text-color has-background\" style=\"border-radius:50px;color:#2a2241\">Button 1</a></div>\n<!-- /wp:button -->\n\n<!-- wp:button {\"textColor\":\"white\",\"style\":{\"border\":{\"radius\":50}},\"className\":\"is-style-outline\"} -->\n<div class=\"wp-block-button is-style-outline\"><a class=\"wp-block-button__link has-white-color has-text-color\" style=\"border-radius:50px\">Button 2</a></div>\n<!-- /wp:button --></div>\n<!-- /wp:buttons --></div>\n<!-- /wp:column -->\n\n<!-- wp:column -->\n<div class=\"wp-block-column\"><!-- wp:image {\"align\":\"right\",\"id\":1285,\"sizeSlug\":\"large\",\"linkDestination\":\"none\"} -->\n<div class=\"wp-block-image\"><figure class=\"alignright size-large\"><img src=\"https://buba.rocks/demo-blocks/wp-content/uploads/sites/2/2021/05/hero1.png\" alt=\"\" class=\"wp-image-1285\"/></figure></div>\n<!-- /wp:image --></div>\n<!-- /wp:column --></div>\n<!-- /wp:columns -->\n\n<!-- wp:spacer {\"height\":10} -->\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n<!-- /wp:spacer -->\n\n<!-- wp:spacer {\"height\":48} -->\n<div style=\"height:48px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n<!-- /wp:spacer --></div></div>\n<!-- /wp:buba-blocks/container --></div><div class=\"buba-scroll\" style=\"left:45%;bottom:30px\" id=\"buba-scroll\">Scroll Down</div></div>\n<!-- /wp:buba-blocks/section -->",
                'categories'  => array('sections'),
                )
        );

        register_block_pattern(
            'buba-blocks/cta',
            array(
                'title'   => __( 'CTA section', 'buba-blocks' ),
                'content' => "<!-- wp:buba-blocks/section {\"spacing\":{\"padding\":{\"top\":{\"typeSpacing\":\"custom\",\"number\":\"73\",\"label\":\"Padding Top\"},\"right\":{\"typeSpacing\":\"custom\",\"number\":\"80\",\"label\":\"Padding Right\"},\"bottom\":{\"typeSpacing\":\"custom\",\"number\":\"73\",\"label\":\"Padding Bottom\"},\"left\":{\"typeSpacing\":\"custom\",\"number\":\"80\",\"label\":\"Padding Left\"}},\"margin\":{\"top\":{\"typeSpacing\":\"none\",\"number\":0,\"label\":\"Margin Top\"},\"right\":{\"typeSpacing\":\"auto\",\"number\":0,\"label\":\"Margin Right\"},\"bottom\":{\"typeSpacing\":\"none\",\"number\":0,\"label\":\"Margin Bottom\"},\"left\":{\"typeSpacing\":\"auto\",\"number\":0,\"label\":\"Margin Left\"}}},\"desktopHeight\":\"380px\",\"mediaId\":1306,\"mediaUrl\":\"https://buba.rocks/demo-blocks/wp-content/uploads/sites/2/2021/05/bgr.png\",\"mediaType\":\"image\",\"backgroundPosition\":\"center center\",\"backgroundRepeat\":\"no-repeat\"} -->\n<div class=\"wp-block-buba-blocks-section buba-section width-default buba-padding-top-custom buba-padding-right-custom buba-padding-bottom-custom buba-padding-left-custom buba-margin-top-none buba-margin-right-auto buba-margin-bottom-none buba-margin-left-auto\" style=\"min-height:380px;padding-top:73px;padding-right:80px;padding-bottom:73px;padding-left:80px;background-image:url(https://buba.rocks/demo-blocks/wp-content/uploads/sites/2/2021/05/bgr.png);background-size:cover;background-position:center center;background-repeat:no-repeat;border-style:solid;border-width:1px;border-color:#000;border-radius:0\"><div class=\"buba-section-inside\"><!-- wp:heading {\"textAlign\":\"center\",\"level\":3,\"textColor\":\"white\"} -->\n<h3 class=\"has-text-align-center has-white-color has-text-color\">Download Buba Blocks!</h3>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph {\"align\":\"center\",\"textColor\":\"white\"} -->\n<p class=\"has-text-align-center has-white-color has-text-color\">The Call-To-Action block is great for bringing attention to actionable items or buttons that you want your users to click! It has a ton of block options to help you customize it the way you want!</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:buba-blocks/button {\"borderRadius\":50,\"style\":{\"color\":{\"gradient\":\"linear-gradient(85deg,rgb(235,148,64) 0%,rgb(250,66,89) 32%,rgb(204,76,194) 69%,rgb(113,64,255) 100%)\"}},\"textColor\":\"white\",\"buttonIcon\":\"\",\"alignment\":\"center\",\"className\":\"buba-button-wrap is-style-text\"} -->\n<div class=\"wp-block-buba-blocks-button align-button-center buba-button-wrap is-style-text\"><a class=\"wp-block-button__link has-white-color has-text-color has-background\" style=\"border-radius:50px;background:linear-gradient(85deg,rgb(235,148,64) 0%,rgb(250,66,89) 32%,rgb(204,76,194) 69%,rgb(113,64,255) 100%);padding:15px 30px 15px 30px;--background-hover:#000;--text-hover:#fff;--transition-duration:200ms\">Download Buba Blocks</a></div>\n<!-- /wp:buba-blocks/button --></div></div>\n<!-- /wp:buba-blocks/section -->",
                'categories'  => array('sections'),
            )
        );
        
        register_block_pattern(
            'buba-blocks/tof',
            array(
                'title'   => __( 'Table of contents section', 'buba-blocks' ),
                'content' => '<!-- wp:buba-blocks/section {"border":{"borderWidth":"1px undefined undefined undefined","borderStyle":"none","borderColor":"#000"},"verticalAlignment":"bottom","typeWidth":"full","spacing":{"padding":{"top":{"typeSpacing":"none","number":0,"label":"Padding Top"},"right":{"typeSpacing":"default","number":0,"label":"Padding Right"},"bottom":{"typeSpacing":"none","number":0,"label":"Padding Bottom"},"left":{"typeSpacing":"default","number":0,"label":"Padding Left"}},"margin":{"top":{"typeSpacing":"none","number":0,"label":"Margin Top"},"right":{"typeSpacing":"auto","number":0,"label":"Margin Right"},"bottom":{"typeSpacing":"none","number":0,"label":"Margin Bottom"},"left":{"typeSpacing":"auto","number":0,"label":"Margin Left"}}},"desktopHeight":"300px","overlayColor":"#000000"} -->
                <div class="wp-block-buba-blocks-section buba-section is-vertically-aligned-bottom width-full buba-padding-top-none buba-padding-right-default buba-padding-bottom-none buba-padding-left-default buba-margin-top-none buba-margin-right-auto buba-margin-bottom-none buba-margin-left-auto buba-has-background-dim" style="min-height:300px;background-size:cover;background-color:#000000;border-width:1px undefined undefined undefined;border-style:none;border-color:#000;border-radius:0"><div class="buba-section-inside"><!-- wp:buba-blocks/container {"width":1100} -->
                <div class="wp-block-buba-blocks-container buba-container buba-padding-top-none buba-padding-right-none buba-padding-bottom-none buba-padding-left-none buba-margin-top-none buba-margin-bottom-none" style="max-width:1100px;background-size:cover"><div class="buba-container-inside"><!-- wp:buba-blocks/table-of-contents {"titleFontSize":20,"titleBottomSpacing":30,"horizontalPadding":60,"contentFontSize":20,"verticalMargin":0,"horizontalMargin":0,"headersCount":0,"align":"left"} -->
                <div class="wp-block-buba-blocks-table-of-contents alignleft buba-table-of-contents" style="padding-top:30px;padding-bottom:30px;padding-right:60px;padding-left:60px;background-color:#eee;border-color:#000"><h3 class="buba-table-of-contents__title" style="font-size:20px;color:#000;margin-bottom:30px;text-align:left">Table of contents</h3><ul class="buba-table-of-contents__list"></ul></div>
                <!-- /wp:buba-blocks/table-of-contents --></div></div>
                <!-- /wp:buba-blocks/container --></div></div>
                <!-- /wp:buba-blocks/section -->',
                'categories'  => array('sections'),
            )
        );

//        register_block_pattern(
//            'buba-blocks/testimonials',
//            array(
//                'title'   => __( 'Testimonials section', 'buba-blocks' ),
//                'content' => "<!-- wp:buba-blocks/section {\"border\":{\"borderWidth\":\"1px   \",\"borderStyle\":\"none\",\"borderColor\":\"#000\"},\"typeWidth\":\"full\",\"desktopHeight\":\"100%\",\"overlayColor\":\"#ffffff\"} -->\n<div class=\"wp-block-buba-blocks-section buba-section width-full buba-padding-top-default buba-padding-right-default buba-padding-bottom-default buba-padding-left-default buba-margin-top-none buba-margin-right-auto buba-margin-bottom-none buba-margin-left-auto buba-has-background-dim\" style=\"min-height:100%;background-size:cover;background-color:#ffffff;border-width:1px   ;border-style:none;border-color:#000;border-radius:0\"><div class=\"buba-section-inside\"><!-- wp:buba-blocks/slider {\"countSlides\":2,\"autoplay\":true,\"infinite\":false} -->\n<div class=\"wp-block-buba-blocks-slider\"><div class=\"slick-slider-wrap\" data-slick=\"{&quot;arrows&quot;:false,&quot;dots&quot;:false,&quot;infinite&quot;:false,&quot;speed&quot;:500,&quot;fade&quot;:false,&quot;autoplay&quot;:true,&quot;autoplaySpeed&quot;:3000,&quot;slidesToShow&quot;:1,&quot;slidesToScroll&quot;:1,&quot;cssEase&quot;:&quot;ease&quot;}\"><!-- wp:cover {\"overlayColor\":\"white\"} -->\n<div class=\"wp-block-cover has-white-background-color has-background-dim\"><div class=\"wp-block-cover__inner-container\"><!-- wp:buba-blocks/section {\"border\":{\"borderWidth\":\"1px   \",\"borderStyle\":\"none\",\"borderColor\":\"#000\"},\"typeWidth\":\"custom\",\"width\":800,\"desktopHeight\":\"100%\"} -->\n<div class=\"wp-block-buba-blocks-section buba-section width-custom buba-padding-top-default buba-padding-right-default buba-padding-bottom-default buba-padding-left-default buba-margin-top-none buba-margin-right-auto buba-margin-bottom-none buba-margin-left-auto\" style=\"max-width:800px;min-height:100%;background-size:cover;border-width:1px   ;border-style:none;border-color:#000;border-radius:0\"><div class=\"buba-section-inside\"><!-- wp:image {\"align\":\"center\",\"id\":1143,\"sizeSlug\":\"full\",\"linkDestination\":\"none\"} -->\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img src=\"http://buba-gutenberg/wp-content/uploads/2021/08/quote.png\" alt=\"\" class=\"wp-image-1143\"/></figure></div>\n<!-- /wp:image -->\n\n<!-- wp:paragraph {\"textColor\":\"black\",\"fontSize\":\"medium\"} -->\n<p class=\"has-black-color has-text-color has-medium-font-size\"><em>Their customer service was amazing and the paint job in my living room came out perfect. I’ve had some bad experiences with other local handyman companies in the area so I decided to try this company.</em></p>\n<!-- /wp:paragraph --></div></div>\n<!-- /wp:buba-blocks/section --></div></div>\n<!-- /wp:cover -->\n\n<!-- wp:cover {\"overlayColor\":\"white\"} -->\n<div class=\"wp-block-cover has-white-background-color has-background-dim\"><div class=\"wp-block-cover__inner-container\"><!-- wp:buba-blocks/section {\"border\":{\"borderWidth\":\"1px   \",\"borderStyle\":\"none\",\"borderColor\":\"#000\"},\"typeWidth\":\"custom\",\"width\":800,\"desktopHeight\":\"100%\"} -->\n<div class=\"wp-block-buba-blocks-section buba-section width-custom buba-padding-top-default buba-padding-right-default buba-padding-bottom-default buba-padding-left-default buba-margin-top-none buba-margin-right-auto buba-margin-bottom-none buba-margin-left-auto\" style=\"max-width:800px;min-height:100%;background-size:cover;border-width:1px   ;border-style:none;border-color:#000;border-radius:0\"><div class=\"buba-section-inside\"><!-- wp:image {\"align\":\"center\",\"id\":1143,\"sizeSlug\":\"full\",\"linkDestination\":\"none\"} -->\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img src=\"http://buba-gutenberg/wp-content/uploads/2021/08/quote.png\" alt=\"\" class=\"wp-image-1143\"/></figure></div>\n<!-- /wp:image -->\n\n<!-- wp:paragraph {\"textColor\":\"black\",\"fontSize\":\"medium\"} -->\n<p class=\"has-black-color has-text-color has-medium-font-size\"><em>Their customer service was amazing and the paint job in my living room came out perfect. I’ve had some bad experiences with other local handyman companies in the area so I decided to try this company.</em></p>\n<!-- /wp:paragraph --></div></div>\n<!-- /wp:buba-blocks/section --></div></div>\n<!-- /wp:cover --></div></div>\n<!-- /wp:buba-blocks/slider --></div></div>\n<!-- /wp:buba-blocks/section -->",
//                'categories'  => array('sections'),
//                )
//        );

    }
}
add_action( 'init', 'buba_blocks_register_block_patterns' );