---
to: panel.ts
---
// This file includes your custom panel logic.
// Custom panels let users customize your widget in the Editor.
// Learn about the panel.ts file: https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/wix-cli/supported-extensions/site-extensions/blocks-site-widgets/panel-ts
// Learn about the Wix CLI and Blocks: https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/wix-blocks/code-in-blocks/about-the-blocks-cli-integration

import { definePanel } from '@wix/blocks';
import { widget } from '@wix/editor'; // The Widget API enables you to get and set the properties and design presets of a site widget

export default definePanel('<%- id -%>', ($w) => {
  $w.onReady(async () => {
    // Initialize the panel element values according to your widget's properties.
    // Add event handlers for panel elements to update your widget's properties whenever a user interacts with the panel.
    await widget.setProp('displayName', 'My widget!')
    console.log("Panel is ready");
  });
});
