hunk.code_window: ];
   export const actionsExist = (state: AppState): boolean =>
     !!state.entities.actions.length;
   function ConnectDataCTA() {
     const applicationId = useSelector(getCurrentApplicationId);
     const pageId = useSelector(getCurrentPageId);
     const dispatch = useDispatch();
  
hunk.labels: keep keep keep keep keep replace keep keep keep
hunk.after_edit: type ConnectDataCTAProps = {
     widgetTitle: string;
     widgetId?: string;
     widgetType?: WidgetType;
   };
   function ConnectDataCTA(props: ConnectDataCTAProps) {
  
hunk.file_path: app/client/src/pages/Editor/PropertyPane/ConnectDataCTA.tsx
hunk.type: replace
file: import { makeFactory } from "factory.ts";
  import { WidgetProps } from "widgets/BaseWidget";
  import { ContainerWidgetProps } from "widgets/ContainerWidget";
  import defaultTemplate from "../../src/templates/default";
  import { WidgetTypeFactories } from "./Widgets/WidgetTypeFactories";
  const defaultMainContainer: ContainerWidgetProps<WidgetProps> = {
    ...(defaultTemplate as any),
    renderMode: "PAGE",
    version: 1,
    isLoading: false,
  };
  
  export const mainContainerFactory = makeFactory({ ...defaultMainContainer });
  export const widgetCanvasFactory = makeFactory(mainContainerFactory.build());
  const buildChild = (child: Partial<WidgetProps>): WidgetProps => {
    return WidgetTypeFactories[child.type || "CANVAS_WIDGET"].build({
      ...child,
    });
  };
  export const buildChildren = (children: Partial<WidgetProps>[]) => {
    try {
      return children.map((child) => {
        return buildChild(child);
      });
    } catch (error) {
      console.error("Check if child widget data provided");
    }
  };
  
  export const buildDslWithChildren = (childData: Partial<WidgetProps>[]) => {
    const children: any = buildChildren(childData);
    return widgetCanvasFactory.build({
      children,
    });
  };
  