import { __ } from "@wordpress/i18n"; import { useEffect, useState } from "@wordpress/element"; import DatePicker from "react-datepicker"; import "react-datepicker/dist/react-datepicker.css"; import { ChildPanelBody, SPRangeControl, SelectField, Divider, Background, Toggle, InputControl, MediaPicker, MultipleSelect, SelectDropdown, MultiSelectDndKit, Taxonomies, } from "../../components"; import { BgIcon, GradientIcon, TransparentIcon } from "../../components/background/svgIcon"; import { DotsPagination, DynamicPagination, StrokesPagination, ScrollbarPagination, FractionPagination, NumbersPagination, Outline, BasicOutline, UserSolid, Rounded, Female, Circle, Minimal, UserAuthor, AlignCenter, AlignLeft, AlignRight } from "../../icons/icons"; import { capitalizeString, filterSelectOptions, inArray, useDeviceType } from "../../controls/controls"; import { getObjectValuesToJsArray, rearrangeAboveTitle } from "./helpFn"; import useAllPosts from "../../hooks/useAllPosts"; import useMetaData from "../../hooks/useMetaData"; import { orderByOptions, paginationDotsStyle } from "../../controls/constants"; import useApiData from "../../hooks/useApiData"; import SPToggleGroupControl from "../../components/toggleGroupControl/toggleGroupControl"; import useDefaultValue from "../../hooks/useDefaultValue"; import DragAndDropDnd from "../../components/multipleSelect/dragAndDropDnd"; import { ArrowMinimal, ArrowOutline, ArrowSolid, ChevronBold, ChevronBorderLine, ChevronOutline, ChevronSolid, DoubleChevron, DoubleChevronBorderLine, DoubleChevronOutline, TriangleOutline, } from "../../icons/arrowIcons"; import ProInfo from "../../components/proInfo/proInfo"; export const QueryBuilderGeneralTab = ({ attributes, setAttributes }) => { const { postType, quickQuery, orderBy, filterByAuthor, filterByDate, specificDate, specificMonth, specificYear, specificPeriodAfter, specificPeriodBefore, specificDateBefore, specificDateAfter, filterByKeyword, orderDirection, includeOnlyPost, excludePost, excludeTerm, excludeAuthor, excludePostWithoutImagePosts, excludeChildrenPosts, excludeProtectedPosts, excludeCurrentPosts, excludeStickyPosts, noResultFoundResult, postLimit, offset, filterProduct, uniqueId, multiplePostType, excludeDateAfter, excludeDateBefore, contentPartArray, taxonomies, } = attributes; const { allPostTypes, allMetaKeys, authorList, allTaxonomies } = useMetaData(attributes, "editSite"); const { allPosts } = useAllPosts(attributes); const dateOptions = [ { label: "Default", value: "" }, { label: "Yesterday", value: "yesterday" }, { label: "Today Only", value: "today_only" }, { label: "Today and Onwards", value: "today_onwards" }, { label: "This Week", value: "this_week" }, { label: "This Month", value: "this_month" }, { label: "This Year", value: "this_year" }, { label: "Past Week", value: "week_ago" }, { label: "Past Month", value: "month_ago" }, { label: "Past Quarter", value: "past_quarter" }, { label: "Past Year", value: "year_ago" }, { label: "Specific Date & Before", value: "specific_date_before" }, { label: "Specific Date & After", value: "specific_date_after" }, { label: "Specific Date", value: "specific_date" }, { label: "Specific Month", value: "specific_month" }, { label: "Specific Year", value: "specific_year" }, { label: "Specific Period (From & To)", value: "specific_period" }, { label: "Exclude Specific Date", value: "exclude_specific_date" }, ]; // this function create for convert allPostTypes to select control options. const postTypeValues = getObjectValuesToJsArray(allPostTypes); const postTypeOptions = postTypeValues?.map((singlePostType) => ({ label: `${capitalizeString(singlePostType)}s`, value: singlePostType, })); const updatePostTypeOptions = postTypeOptions?.map((item, index) => ({ id: index + 1, label: item.value === "attachment" ? "Media" : item.label, value: item.value, })); const multiSelectPostType = [ ...updatePostTypeOptions, { id: updatePostTypeOptions.length + 1, label: "Multiple Post Types", value: "multiple_post_type", }, ]; const filterIncludesPost = (inputFieldData) => { const lowercaseInput = inputFieldData.toLowerCase(); setAttributes({ liveSearchText: lowercaseInput }); }; const includeExcludePostOptions = filterSelectOptions(allPosts, "post_title", "ID", "ID"); const defaultPostType = [ { label: "Posts", value: "post" }, { label: "Pages", value: "page" }, ]; let allTerms = []; allTaxonomies?.forEach((taxonomy) => { allTerms = [...allTerms, ...taxonomy.terms_items]; }); const onPostTypeChange = (newValue) => { if (newValue === postType) { return; } // Add Product Template part value for Content Area Draggable const newContentPartArray = []; const productComponents = [ { id: 7, label: "Star Rating", value: "starRating" }, { id: 8, label: "Price", value: "price" }, { id: 9, label: "Add To Cart", value: "addToCart" }, ]; if (newValue === "product") { newContentPartArray.push(...contentPartArray, ...productComponents); } else { const newProductSet = new Set(productComponents.map((item) => JSON.stringify(item))); const filterContentArray = contentPartArray.filter((item) => !newProductSet.has(JSON.stringify(item))); newContentPartArray.push(...filterContentArray); } // It will add product relate object in array when postType is product and remove if not product. setAttributes({ postType: newValue, taxonomies: [ { id: 1, type: "", value: [], operator: "IN", }, ], includeOnlyPost: [], excludeTerm: [], excludeAuthor: [], excludePost: [], contentPartArray: newContentPartArray, }); }; const onDateChangeHandler = (newDate, attrKey) => { const d = new Date(newDate); const updatedDate = new Date( Date.UTC(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours(), d.getMinutes(), d.getSeconds()) ).toISOString(); setAttributes({ [attrKey]: updatedDate }); }; const toLocalDateWithoutShift = (isoString) => { const d = new Date(isoString); // Extract the stored UTC values as real values return new Date( d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds() ); }; const onPostTypeChangeHandler = (e) => { setAttributes({ multiplePostType: e, taxonomies: [ { id: 1, type: "", value: [], operator: "IN", initialOpen: true, }, ], catTabCategoryType: "", }) } return ( <> {/* 1 ? multiSelectPostType : defaultPostType } /> { 'multiple_post_type' === postType && ( */} { }} attributesKey={"multiplePostType"} setAttributes={setAttributes} onChange={(e) => onPostTypeChangeHandler(e)} items={updatePostTypeOptions.length > 0 ? updatePostTypeOptions : defaultPostType} /> {/* ) } */} {/* advanced filtering */} {/* taxonomy type */} { }} attributesKey={"multiplePostType"} setAttributes={setAttributes} onChange={(e) => setAttributes({ filterByAuthor: e })} items={authorList} /> {"specific_date" === filterByDate && (
Date setAttributes({ specificDate: date })} />
)} {"specific_date_before" === filterByDate && (
Date Before onDateChangeHandler(date, "specificDateBefore")} />
)} {"specific_date_after" === filterByDate && (
Date From onDateChangeHandler(date, "specificDateAfter")} />
)} {"specific_period" === filterByDate && (
From setAttributes({ specificPeriodAfter: date, }) } startDate={specificPeriodAfter} endDate={specificPeriodBefore} />
To setAttributes({ specificPeriodBefore: date, }) } startDate={specificPeriodAfter} endDate={specificPeriodBefore} />
)} {"exclude_specific_date" === filterByDate && (
From setAttributes({ excludeDateBefore: date })} startDate={excludeDateAfter} endDate={excludeDateBefore} />
To setAttributes({ excludeDateAfter: date })} startDate={excludeDateAfter} endDate={excludeDateBefore} />
)} {"specific_month" === filterByDate && ( )} {"specific_year" === filterByDate && ( )} {/* */} {/* Filter by Custom Fields */} {/* */} {"rand" !== orderBy && ( )}
{/* common filtering */} filterIncludesPost(e)} onChange={(e) => setAttributes({ includeOnlyPost: e })} /> {includeOnlyPost?.length === 0 && ( setAttributes({ excludePost: e })} onInputChange={(e) => filterIncludesPost(e)} items={includeExcludePostOptions} /> )} {/* setAttributes({ excludeTerm: val })} onInputChange={() => {}} setAttributes={setAttributes} items={allTerms} /> */} {/* {}} setAttributes={setAttributes} items={authorList} /> */} {/* */} {/* */} {/* */} {/* */} {/* */}

Premium Only

Unlock advanced query options, including:

  • — Popular Posts by views (3 days, 7 days, 14 days, 30 days, 3 months, 1 year, all time)
  • — Filter by keyword & custom fields
  • — Order by Most Liked and Most Viewed
  • — Exclude by term, author, or current post
  • — Exclude password-protected, child, or posts without thumb, etc...
Upgrade to Pro
); }; export const ImageGeneralTab = ({ attributes, setAttributes }) => { const { imageFeaturedImg, imageSize, imageWidth, imageHeight, imagePosition, imageOverlayColor, imageScale, imageFallbackReplace, imageSrcset, imageLazyLoad, imageReplaceWith, imageOverlayType, imageOverlayCustomColor, postSliderLayout, blockName, imageReplaceWithVideo, imageReplaceWithImage, toggleCustomFallbackBg, contentOrientation, thumbnailSliderLayout, blockLayoutName, largeImageSize, largeImageWidth, largeImageHeight, showImageGallery, imageGallerySource, showImageGalleryNavArrow, showImageGalleryNavArrowHover, imageGalleryNavArrowStyle, imageGalleryNavArrowSize, } = attributes; const { imageSizes } = useMetaData(attributes); const [contentAreaBgStyleType, setContentAreaBgStyleType] = useState("color"); const defaultValue = useDefaultValue(blockName); const imageSizesOption = imageSizes ? imageSizes?.map((size) => { return { label: size, value: size }; }) : []; imageSizesOption.unshift({ label: "Original Size", value: "" }); if ( imagePosition !== "background" && !["post-thumbnail-slider", "thumbnail-slider-two"].includes(blockName) && ![ "post-slider-layout-one", "post-slider-layout-two", // 'post-slider-layout-three', ].includes(blockLayoutName) ) { imageSizesOption.push({ label: __("Custom Size (Pro)", "post-carousel"), value: "custom", disabled: "disabled" }); } const imagePositionItems = []; if ( ![ "post-slider", "post-slider-two", "post-thumbnail-slider", "thumbnail-slider-two", "post-grid-six", "post-list-two", "post-list-three", ].includes(blockName) ) { imagePositionItems.push( { label: "Top", value: "top" }, { label: "Left", value: "left" }, { label: "Right", value: "right" } ); } if (["post-slider-two-layout-three"].includes(blockLayoutName)) { imagePositionItems.push({ label: "Left", value: "left" }, { label: "Right", value: "right" }); } if ( ![ "post-grid-one", "post-timeline-one", "post-slider", "post-slider-two", "post-thumbnail-slider", "timeline-one", "post-grid-six", "post-list-two", "post-list-three", ].includes(blockName) ) { imagePositionItems.push({ label: "Background", value: "background" }); } return ( <> {/* { ! [ 'post-grid-three', 'post-grid-four', 'post-grid-five', 'post-timeline-two', 'post-slider', 'post-slider-two', 'post-thumbnail-slider', ].includes(blockName) && ( ) } */} {/* TODO: Need get image size for below select fields */} {imageFeaturedImg && ( <> {!inArray( [ "grid-six-layout-one", "sp-smart-post-list-two-layout-five", "sp-smart-post-list-two-layout-six", "sp-smart-post-list-two-layout-seven", "sp-smart-post-list-two-layout-eight", ], blockLayoutName ) && ( <> {!["post-timeline-one", "post-list-one", "post-list-two", "post-list-three"].includes( blockName ) && ( <> )} {"custom" === imageSize && imageSizesOption.find((v) => v.value === "custom") && ( <> {!inArray(["post-slider-layout-five"], blockLayoutName) && ( )} )} )} {["post-grid-one", "post-grid-six"].includes(blockName) && !["grid-one-layout-one", "grid-one-layout-five", "grid-six-layout-four"].includes( blockLayoutName ) && ( <> {"custom" === largeImageSize && imageSizesOption.find((v) => v.value === "custom") && ( <> {!inArray( ["post-slider-layout-five", "grid-six-layout-one", "grid-six-layout-two"], blockLayoutName ) && ( )} )} )} {/* { ! [ // 'post-grid-two', 'post-slider', 'post-slider-two', 'post-grid-three', 'post-grid-four', 'post-grid-five', 'post-timeline-two', 'post-list-one', 'thumbnail-slider-two', ].includes( blockName ) && imagePositionItems?.length > 0 && ( <> { ! [ 'post-slider-layout-four', 'post-slider-layout-five', 'thumbnail-slider-layout-six', ].includes( blockLayoutName ) && ! [ 'post-grid-six', 'post-slider-two', 'post-grid-two', ].includes( blockName ) && ( ) } { blockLayoutName && [ 'post-slider-layout-four', 'post-slider-layout-five', 'post-slider-two-layout-three', 'thumbnail-slider-layout-six', 'grid-six-layout-one', 'grid-six-layout-two', ].includes( blockLayoutName ) && ( ) } { imagePosition === 'background' && ! [ 'post-slider', 'post-slider-two', ].includes( blockName ) && ( ) } ) } */} {!inArray(["grid-six-layout-two", "grid-six-layout-three"], contentOrientation) && ( )} {"custom" === imageOverlayColor && ( <> setContentAreaBgStyleType(val)} /> , value: "transparent", tooltip: "Transparent", }, { label: , value: "bgColor", tooltip: "Solid", }, { label: , value: "gradient", tooltip: "Gradient", }, ]} /> )} {!["post-grid-three"].includes(blockName) && ( )} {/* {imageFallbackReplace === "source" && ( )} */} {imageFallbackReplace === "custom" && ( )} {imageFallbackReplace === "custom" && toggleCustomFallbackBg === "img" && ( )} {imageFallbackReplace === "custom" && toggleCustomFallbackBg === "video" && ( )}

Premium Only

Unlock advanced Image and video Options, including:

  • — Image Custom Sizing
  • — Add and display featured video
  • — Replace Featured Image
  • — Display posts gallery images
  • — Boosts image performance by enabling Srcset
Upgrade to Pro
)} ); }; export const ContentAreaGeneralTab = ({ attributes, setAttributes }) => { const { contentPartArray, catTabCategoryPosition } = attributes; return (<> setAttributes({ contentPartArray: e })} catTabCategoryPosition={catTabCategoryPosition} setAttributes={setAttributes} /> Rearrange content easily — Unlock Drag & Drop. Upgrade to Pro! ); }; export const TitleGeneralTab = ({ attributes, setAttributes }) => { const { titleShow, titleHTMLTag, titleLength, postBadgesShow, postBadgesPosition, badgesGap, contentOnHover, blockName, titleOnHover, titleType, } = attributes; return ( <> {titleShow && ( <> {titleType === "limit" && ( )} {!contentOnHover && ["post-carousel-two", "post-grid-two"].includes(blockName) && ( )} {/* {!postBadgesModules && postBadgesShow && (

Note: Post Badge Module {" "} is disabled. Enable it to use Post Badges.

)} */} {postBadgesShow && ( <> )} Highlight important posts instantly with eye-catching badges. — Unlock Post Badges. Upgrade to Pro! )} ); }; export const MetaDataGeneralTab = ({ attributes, setAttributes }) => { const { metaAuthorStyle, metaDateFormat, metaPerMin, metaReadingTimePostfix, metaUserIcon, metaDateCustomDateFormat, metaDataArray, catTabCategoryPosition, metaDataAllContentArray, metaDisplayType, contentOnHover, blockName, metaOnHover, contentOrientation, } = attributes; const metaDataContentArray = metaDataAllContentArray.filter((item) => item.value !== ""); const showAuthor = metaDataContentArray.some((item) => item.value === "author" && item.show); const showDate = metaDataContentArray.some((item) => item.value === "date" && item.show); const showReadingTime = metaDataContentArray.some((item) => item.value === "reading-time" && item.show); return ( <> { setAttributes({ metaDataAllContentArray: e }); }} /> {!contentOnHover && ["post-carousel-two", "post-grid-two"].includes(blockName) && ( )} {showAuthor && ( <> {"name_with_icon" === metaAuthorStyle && (
, }, { label: "Basic Outline", value: "basic-outline", icon: , }, { label: "Solid", value: "user-solid", icon: , }, { label: "Profile Rounded", value: "rounded", icon: , }, { label: "Profile Circle", value: "circle", icon: , }, { label: "Female", value: "female", icon: , }, { label: "Author", value: "author", icon: , }, { label: "Minimal", value: "minimal", icon: , }, ]} />
)} )} {/* */} {showDate && "orientation_two" !== contentOrientation && ( <> {metaDateFormat === "custom" && ( <> {__("To define format, check", "post-carousel")} {" "} this doc. } attributes={metaDateCustomDateFormat} attributesKey={"metaDateCustomDateFormat"} setAttributes={setAttributes} inputType={"string"} flex={false} placeholder={"F j, Y"} /> )} )} {showReadingTime && ( <> )}

Take control of your meta styling:

  • — Drag & Drop meta items
  • — flexible Left-Right splits
Upgrade to Pro
); }; export const CategoryGeneralTab = ({ attributes, setAttributes }) => { const { catTabCategoryEnable, catTabCategoryPosition, catTabCategoryType, metaDataAllContentArray, contentPartArray, contentOnHover, blockName, taxonomyOnHover, allTaxonomy, } = attributes; useEffect(() => { const hasCategory = metaDataAllContentArray.some((t) => t.value === "taxonomy"); let besideMetaArray; // let updatedContentArray; const updatedContentArray = contentPartArray; if (catTabCategoryPosition === "beside-other-meta") { besideMetaArray = hasCategory ? [...metaDataAllContentArray] : [ ...metaDataAllContentArray, { label: "Taxonomy", value: "taxonomy", id: 7, show: true, }, ]; } else { besideMetaArray = metaDataAllContentArray.filter((t) => t.value !== "taxonomy"); } if (catTabCategoryPosition === "above-title") { rearrangeAboveTitle(updatedContentArray); } setAttributes({ metaDataAllContentArray: besideMetaArray, contentPartArray: updatedContentArray, }); }, [catTabCategoryPosition]); const { allTaxonomies } = useMetaData(attributes, "editSite"); useEffect(() => { if (allTaxonomies?.length > 0) { setAttributes({ allTaxonomy: allTaxonomies }); } }, [allTaxonomies]); return ( <> {!contentOnHover && ["post-carousel-two", "post-grid-two"].includes(blockName) && ( )} {catTabCategoryEnable && ( <> Enhance post discovery by displaying categories or tags — Unlock Taxonomy Type. Upgrade to Pro )} ); }; export const ExcerptGeneralTab = ({ attributes, setAttributes }) => { const { excerptShow, seoMetaShow, excerptType, excerptLength, ellipsisPointsEndingExcerpt, contentOnHover, blockName, excerptOnHover, } = attributes; const excerptMax = excerptLength?.unit === "words" ? 100 : 200; return ( <> {!contentOnHover && ["post-carousel-two", "post-grid-two"].includes(blockName) && excerptShow && ( )} {excerptShow && ( <> {excerptType && excerptType === "limited" && ( <> )} Show SEO meta from Yoast, RankMath, AIO, SEOPress & more. Upgrade to Pro )} ); }; export const ReadMoreGeneralTab = ({ attributes, setAttributes }) => { const { showReadMoreButton, readMoreButtonLabel, readMoreButtonType, contentOnHover, blockName, readMoreOnHover } = attributes; return ( <> {!contentOnHover && ["post-carousel-two", "post-grid-two"].includes(blockName) && showReadMoreButton && ( )} {showReadMoreButton && ( <> )} ); }; export const SocialShareGeneralTab = ({ attributes, setAttributes }) => { const { socialShareEnableSocial, socialSharingMedia, uniqueId, socialIconDisplayType, socialShareDisplayOnHover, socialShareIconPosition, metaDisplayType, contentOnHover, blockName, socialShareOnHover, } = attributes; return ( <> {!contentOnHover && ["post-carousel-two", "post-grid-two"].includes(blockName) && socialShareEnableSocial && ( )} {socialShareEnableSocial && ( <> setAttributes({ socialSharingMedia: e })} /> {"popup-share" === socialIconDisplayType && ( <> )} {"popup-share" === socialIconDisplayType && ( <> )} Display social share icons in a popup for a smarter, cleaner, and minimal showcase. Upgrade to Pro! )} ); }; export const PopupDetailsGeneralTab = ({ attributes, setAttributes }) => { const { popupImageSize, popupCloseBtnEnable, popupCloseBtnSize, popupMaxWidth, popupMaxHeight, popupImageHeight, popupImageWidth, } = attributes; const { imageSizes } = useMetaData(attributes); const imageSizesOption = imageSizes ? imageSizes?.map((size) => { return { label: size, value: size }; }) : []; return ( <> {"custom" === popupImageSize && ( <> )} {popupCloseBtnEnable && ( )} ); }; export const PaginationGeneralTab = ({ attributes, setAttributes }) => { const { paginationType, loadMoreInfiniteScroll, loadMoreBtnLabel, loadMoreEndMessage, paginationAlign, paginationStyle, paginationPrevLabel, paginationNextLabel, paginationSpaceBetween, navigationArrowStyle, navigationArrowSize, navigationArrowWidth, navigationArrowHeight, navigationArrowPosition, } = attributes; const togglePaginationType = (newValue) => { if (newValue !== "load-more") { setAttributes({ paginationType: newValue, loadMoreInfiniteScroll: false, }); } setAttributes({ paginationType: newValue }); }; return ( <> togglePaginationType(e)} items={[ { label: "Load More", value: "load-more" }, { label: "Navigation", value: "navigation" }, { label: "Number", value: "pagination" }, ]} /> {paginationType === "load-more" && ( <> {!loadMoreInfiniteScroll && ( )} )} {paginationType === "navigation" && ( <> , }, { label: __("Chevron Outline", "post-carousel"), value: "chevron-outline", icon: , }, { label: __("Chevron Bold", "post-carousel"), value: "chevron-bold", icon: , }, { label: __("Double Chevron", "post-carousel"), value: "double-chevron", icon: , }, { label: __("Arrow Solid", "post-carousel"), value: "arrow-solid", icon: , }, { label: __("Arrow Outline", "post-carousel"), value: "arrow-outline", icon: , }, { label: __("Arrow Minimal", "post-carousel"), value: "arrow-minimal", icon: , }, { label: __("Chevron Border Line", "post-carousel"), value: "chevron-border-line", icon: , }, { label: __("Double Chevron Outline", "post-carousel"), value: "double-chevron-outline", icon: , }, { label: __("Triangle Outline", "post-carousel"), value: "triangle-outline", icon: , }, ]} /> )} {paginationType === "pagination" && ( <> {["number+prev/next+arrow", "prev/next"].includes(paginationStyle) && ( <> )} )} , value: "left" }, { label: , value: "center" }, { label: , value: "right" }, ]} /> ); }; export const CarouselNavArrowGeneralTab = ({ attributes, setAttributes, verticalPosition = true }) => { const { carouselArrowStyle, carouselArrowSize, carouselArrowWidth, carouselArrowHeight, carouselArrowSpaceBetween, carouselArrowHorizontal, carouselArrowVertical, blockName, navArrowVisibilityOnHover, } = attributes; const defaultData = useDefaultValue(blockName); return ( <> , }, { label: __("Chevron Outline", "post-carousel"), value: "chevron-outline", icon: , }, { label: __("Chevron Bold", "post-carousel"), value: "chevron-bold", icon: , }, { label: __("Double Chevron", "post-carousel"), value: "double-chevron", icon: , }, { label: __("Arrow Solid", "post-carousel"), value: "arrow-solid", icon: , }, { label: __("Arrow Outline", "post-carousel"), value: "arrow-outline", icon: , }, { label: __("Arrow Minimal", "post-carousel"), value: "arrow-minimal", icon: , }, { label: __("Chevron Border Line", "post-carousel"), value: "chevron-border-line", icon: , }, { label: __("Double Chevron Outline", "post-carousel"), value: "double-chevron-outline", icon: , }, { label: __("Triangle Outline", "post-carousel"), value: "triangle-outline", icon: , }, ]} /> {verticalPosition && ( )} ); }; export const CarouselPaginationGeneralTab = ({ attributes, setAttributes }) => { const { carouselPaginationStyle, carouselPaginationWidth, carouselPaginationHeight, carouselPaginationSpaceBetween, carouselPaginationHorizontal, carouselPaginationVertical, blockName, } = attributes; const device = useDeviceType(); const paginationDotChangeHandler = (value) => { setAttributes({ carouselPaginationStyle: value, carouselPaginationWidth: { ...carouselPaginationWidth, device: { ...carouselPaginationWidth.device, [device]: paginationDotsStyle[value].width, }, }, carouselPaginationHeight: { ...carouselPaginationHeight, device: { ...carouselPaginationHeight.device, [device]: paginationDotsStyle[value].height, }, }, }); }; return ( <> }, { label: "Scrollbar", value: "scrollbar", icon: , }, { label: "Numbers", value: "numbers", icon: , }, { label: "Dynamic", value: "dynamic", icon: , disabled: "disabled", type: "pro", }, { label: "Strokes", value: "strokes", icon: , type: "pro", disabled: "disabled", }, { label: "Fraction", value: "fraction", icon: , type: "pro", disabled: "disabled", }, ]} /> {carouselPaginationStyle !== "scrollbar" && ( <> )} {carouselPaginationStyle !== "fraction" && ( <> )} {carouselPaginationStyle !== "scrollbar" && ( <> {carouselPaginationStyle !== "fraction" && ( )} )} ); };