{
  "$schema": "https://schemas.wp.org/trunk/block.json",
  "apiVersion": 3,
  "name": "bpsc/schedule-section",
  "version": "1.0.0",
  "title": "Schedule Section",
  "category": "bPlugins",
  "description": "A modern schedule / events block with date sorting, past-event handling, and full customization.",
  "keywords": [
    "schedule",
    "events",
    "calendar",
    "timeline",
    "section collection"
  ],
  "textdomain": "section-collection",
  "attributes": {
    "viewMode": {
      "type": "string",
      "default": "cards"
    },
    "sortOrder": {
      "type": "string",
      "default": "asc"
    },
    "pastEventsMode": {
      "type": "string",
      "default": "archive"
    },
    "archiveLabel": {
      "type": "string",
      "default": "Past Events"
    },
    "archiveOpen": {
      "type": "boolean",
      "default": false
    },
    "events": {
      "type": "array",
      "default": [
        {
          "datetime": "2026-08-15T10:00",
          "endTime": "12:00",
          "title": "Annual Product Launch",
          "category": "Conference",
          "showCategory": true,
          "locationType": "physical",
          "location": "Convention Center, San Francisco",
          "description": "Join us for the unveiling of our 2026 product lineup with live demos and Q&A.",
          "featured": true,
          "buttonText": "Register",
          "buttonLink": "#",
          "buttonTarget": "_self",
          "accentColor": "#4f46e5",
          "icon": "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path fill='currentColor' d='M152 24c0-13.3-10.7-24-24-24s-24 10.7-24 24L104 64 64 64C28.7 64 0 92.7 0 128l0 16 0 48L0 448c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-256 0-48 0-16c0-35.3-28.7-64-64-64l-40 0 0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40L152 64l0-40zM48 192l352 0 0 256c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16l0-256z'/></svg>"
        },
        {
          "datetime": "2026-09-03T14:00",
          "endTime": "17:00",
          "title": "Design Systems Workshop",
          "category": "Workshop",
          "showCategory": true,
          "locationType": "virtual",
          "location": "https://example.com/zoom",
          "description": "A hands-on workshop on building scalable design systems for modern products.",
          "featured": false,
          "buttonText": "Learn More",
          "buttonLink": "#",
          "buttonTarget": "_blank",
          "accentColor": "#10b981",
          "icon": "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='currentColor' d='M64 32C28.7 32 0 60.7 0 96L0 352c0 35.3 28.7 64 64 64l176 0-10.7 32L160 448c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-69.3 0L272 416l176 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L64 32z'/></svg>"
        },
        {
          "datetime": "2026-10-20T09:30",
          "endTime": "16:00",
          "title": "Developer Conference 2026",
          "category": "Conference",
          "showCategory": true,
          "locationType": "physical",
          "location": "Madison Square Garden, NYC",
          "description": "Three tracks, fifty speakers, one incredible day for builders and engineering leaders.",
          "featured": false,
          "buttonText": "Register",
          "buttonLink": "#",
          "buttonTarget": "_self",
          "accentColor": "#f59e0b",
          "icon": "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 512'><path fill='currentColor' d='M96 128a128 128 0 1 1 256 0A128 128 0 1 1 96 128zM0 482.3C0 383.8 79.8 304 178.3 304l91.4 0C368.2 304 448 383.8 448 482.3c0 16.4-13.3 29.7-29.7 29.7L29.7 512C13.3 512 0 498.7 0 482.3z'/></svg>"
        }
      ]
    },
    "header": {
      "type": "object",
      "default": {
        "show": true,
        "showBadge": true,
        "badge": "Whats Coming Up",
        "title": "Upcoming Events",
        "titleTag": "h2",
        "description": "Mark your calendar — here is everything we have lined up for the season.",
        "alignment": "center",
        "badgeTypo": {
          "fontFamily": "Default",
          "fontWeight": "600",
          "fontSize": {
            "desktop": "12px",
            "tablet": "12px",
            "mobile": "11px"
          },
          "lineHeight": "1.4"
        },
        "titleTypo": {
          "fontFamily": "Default",
          "fontWeight": "700",
          "fontSize": {
            "desktop": "40px",
            "tablet": "32px",
            "mobile": "26px"
          },
          "lineHeight": "1.2"
        },
        "descriptionTypo": {
          "fontFamily": "Default",
          "fontWeight": "400",
          "fontSize": {
            "desktop": "16px",
            "tablet": "15px",
            "mobile": "14px"
          },
          "lineHeight": "1.6"
        },
        "badgeColor": "#4f46e5",
        "badgeBg": "rgba(79,70,229,0.1)",
        "titleColor": "#0f172a",
        "descriptionColor": "#64748b",
        "maxWidth": {
          "desktop": "100%",
          "tablet": "100%",
          "mobile": "100%"
        },
        "margin": {
          "desktop": {
            "top": "0px",
            "right": "0px",
            "bottom": "48px",
            "left": "0px"
          },
          "tablet": {
            "top": "0px",
            "right": "0px",
            "bottom": "36px",
            "left": "0px"
          },
          "mobile": {
            "top": "0px",
            "right": "0px",
            "bottom": "28px",
            "left": "0px"
          }
        }
      }
    },
    "layout": {
      "type": "object",
      "default": {
        "columns": {
          "desktop": 3,
          "tablet": 2,
          "mobile": 1
        },
        "gap": {
          "desktop": "24px",
          "tablet": "20px",
          "mobile": "16px"
        }
      }
    },
    "eventBox": {
      "type": "object",
      "default": {
        "bg": {
          "type": "solid",
          "color": "#ffffff",
          "gradient": "linear-gradient(135deg, #ffffff, #f8fafc)",
          "image": {},
          "position": "center center",
          "size": "cover",
          "repeat": "no-repeat",
          "attachment": "scroll"
        },
        "hoverBg": {
          "type": "solid",
          "color": "#ffffff",
          "gradient": "linear-gradient(135deg, #ffffff, #eef2ff)"
        },
        "border": {
          "width": "1px",
          "style": "solid",
          "color": "#e2e8f0",
          "side": "all"
        },
        "hoverBorderColor": "transparent",
        "borderRadius": "16px",
        "shadow": [
          {
            "hOffset": "0px",
            "vOffset": "4px",
            "blur": "16px",
            "spreed": "0px",
            "color": "rgba(15,23,42,0.06)",
            "isInset": false
          }
        ],
        "hoverShadow": [
          {
            "hOffset": "0px",
            "vOffset": "16px",
            "blur": "32px",
            "spreed": "0px",
            "color": "rgba(79,70,229,0.18)",
            "isInset": false
          }
        ],
        "padding": {
          "desktop": {
            "top": "24px",
            "right": "24px",
            "bottom": "24px",
            "left": "24px"
          },
          "tablet": {
            "top": "22px",
            "right": "22px",
            "bottom": "22px",
            "left": "22px"
          },
          "mobile": {
            "top": "20px",
            "right": "18px",
            "bottom": "20px",
            "left": "18px"
          }
        },
        "transitionDuration": "0.3s",
        "hoverLift": "-4px",
        "featuredBadgeText": "Featured",
        "featuredBadgeColor": "#ffffff",
        "featuredBadgeBg": "#ef4444"
      }
    },
    "datePill": {
      "type": "object",
      "default": {
        "bg": "rgba(79,70,229,0.08)",
        "color": "#4f46e5",
        "borderRadius": "10px",
        "padding": {
          "top": "8px",
          "right": "12px",
          "bottom": "8px",
          "left": "12px"
        },
        "dayTypo": {
          "fontFamily": "Default",
          "fontWeight": "800",
          "fontSize": {
            "desktop": "28px",
            "tablet": "24px",
            "mobile": "22px"
          },
          "lineHeight": "1"
        },
        "monthTypo": {
          "fontFamily": "Default",
          "fontWeight": "700",
          "fontSize": {
            "desktop": "11px",
            "tablet": "11px",
            "mobile": "10px"
          },
          "lineHeight": "1.2"
        }
      }
    },
    "eventStyle": {
      "type": "object",
      "default": {
        "categoryTypo": {
          "fontFamily": "Default",
          "fontWeight": "600",
          "fontSize": {
            "desktop": "11px",
            "tablet": "11px",
            "mobile": "11px"
          },
          "lineHeight": "1.4"
        },
        "categoryColor": "#4f46e5",
        "categoryBg": "rgba(79,70,229,0.1)",
        "titleTypo": {
          "fontFamily": "Default",
          "fontWeight": "700",
          "fontSize": {
            "desktop": "20px",
            "tablet": "19px",
            "mobile": "18px"
          },
          "lineHeight": "1.3"
        },
        "titleColor": "#0f172a",
        "timeTypo": {
          "fontFamily": "Default",
          "fontWeight": "500",
          "fontSize": {
            "desktop": "13px",
            "tablet": "13px",
            "mobile": "12px"
          },
          "lineHeight": "1.4"
        },
        "timeColor": "#64748b",
        "locationTypo": {
          "fontFamily": "Default",
          "fontWeight": "500",
          "fontSize": {
            "desktop": "13px",
            "tablet": "13px",
            "mobile": "12px"
          },
          "lineHeight": "1.4"
        },
        "locationColor": "#475569",
        "descriptionTypo": {
          "fontFamily": "Default",
          "fontWeight": "400",
          "fontSize": {
            "desktop": "14px",
            "tablet": "14px",
            "mobile": "13px"
          },
          "lineHeight": "1.6"
        },
        "descriptionColor": "#64748b"
      }
    },
    "button": {
      "type": "object",
      "default": {
        "show": true,
        "icon": "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path fill='currentColor' d='M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.7 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z'/></svg>",
        "iconPosition": "after",
        "iconGap": "8px",
        "typo": {
          "fontFamily": "Default",
          "fontWeight": "600",
          "fontSize": {
            "desktop": "14px",
            "tablet": "14px",
            "mobile": "13px"
          },
          "lineHeight": "1.2"
        },
        "colors": {
          "color": "#4f46e5",
          "bgType": "solid",
          "bg": "transparent",
          "gradient": "linear-gradient(135deg, #4f46e5, #7c3aed)"
        },
        "hoverColors": {
          "color": "#ffffff",
          "bgType": "solid",
          "bg": "#4f46e5",
          "gradient": "linear-gradient(135deg, #4f46e5, #7c3aed)"
        },
        "border": {
          "width": "1px",
          "style": "solid",
          "color": "#4f46e5",
          "side": "all"
        },
        "hoverBorderColor": "#4f46e5",
        "borderRadius": "8px",
        "padding": {
          "top": "10px",
          "right": "20px",
          "bottom": "10px",
          "left": "20px"
        }
      }
    },
    "section": {
      "type": "object",
      "default": {
        "bg": {
          "type": "solid",
          "color": "",
          "gradient": "linear-gradient(135deg, #f8fafc, #eef2ff)",
          "image": {},
          "position": "center center",
          "size": "cover",
          "repeat": "no-repeat",
          "attachment": "scroll"
        },
        "padding": {
          "desktop": {
            "top": "80px",
            "right": "20px",
            "bottom": "80px",
            "left": "20px"
          },
          "tablet": {
            "top": "60px",
            "right": "20px",
            "bottom": "60px",
            "left": "20px"
          },
          "mobile": {
            "top": "48px",
            "right": "16px",
            "bottom": "48px",
            "left": "16px"
          }
        },
        "margin": {
          "desktop": {
            "top": "0px",
            "right": "0px",
            "bottom": "0px",
            "left": "0px"
          },
          "tablet": {
            "top": "0px",
            "right": "0px",
            "bottom": "0px",
            "left": "0px"
          },
          "mobile": {
            "top": "0px",
            "right": "0px",
            "bottom": "0px",
            "left": "0px"
          }
        },
        "maxWidth": {
          "desktop": "1200px",
          "tablet": "100%",
          "mobile": "100%"
        }
      }
    },
    "align": {
      "type": "string",
      "default": "full"
    }
  },
  "supports": {
    "align": [
      "wide",
      "full"
    ],
    "html": false,
    "anchor": true
  },
  "example": {
    "attributes": {}
  },
  "editorScript": "file:../index.js",
  "editorStyle": "file:./index.css",
  "style": "file:./view.css",
  "render": "file:./render.php",
  "viewScript": "file:./view.js"
}