'use client';
import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import{useI18nStore as p,useEditorMode as g,cls as n}from"@gem-sdk/core";import{useState as l,useRef as o,useEffect as i}from"react";let s=({className:s,styles:d})=>{let{t:c}=p(),[h,a]=l(!1),[u,f]=l(!1),m=o(null),w=g();return(i(()=>{let e=new ResizeObserver(()=>{let e=m.current?m.current?.offsetWidth:0;e<160?f(!0):f(!1)});return m.current&&e.observe(m.current),()=>{e?.disconnect()}},[]),"edit"!==w)?null:e(r,{children:[d&&t("style",{children:d}),t("div",{ref:m,"data-slot":"children",className:n(s,"gp-flex gp-h-full gp-w-full gp-items-center gp-rounded-[3px] gp-border gp-border-dashed gp-border-[#9e9e9e] after:!gp-content-none",h?"gp-cursor-pointer":""),onMouseEnter:()=>{a(!0)},onMouseLeave:()=>{a(!1)},children:e("div",{className:`gp-border-box gp-bg-gray gp-flex gp-max-h-8 gp-items-center gp-justify-center gp-gap-2 gp-overflow-hidden gp-whitespace-nowrap gp-rounded-lg gp-px-4 gp-py-2 gp-text-xs gp-font-medium
          ${h?"gp-cursor-pointer gp-bg-[#E2E2E2] gp-text-[#212121]":"gp-text-[#9E9E9E]"}`,style:{flexFlow:"gp-row gp-wrap"},children:[t("div",{className:"gp-flex gp-h-4 gp-w-4 gp-items-center gp-justify-center",dangerouslySetInnerHTML:{__html:(()=>{let e=`<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
    <path d="M7.83301 7.83331V3.83331H9.16634V7.83331H13.1663V9.16665H9.16634V13.1666H7.83301V9.16665H3.83301V7.83331H7.83301Z" fill="#9E9E9E"/>
    </svg>
    `;return h&&(e=`<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
      <path d="M8.95 4.45C8.95 4.20147 8.74853 4 8.5 4C8.25147 4 8.05 4.20147 8.05 4.45V8.05H4.45C4.20147 8.05 4 8.25147 4 8.5C4 8.74853 4.20147 8.95 4.45 8.95H8.05V12.55C8.05 12.7985 8.25147 13 8.5 13C8.74853 13 8.95 12.7985 8.95 12.55V8.95H12.55C12.7985 8.95 13 8.74853 13 8.5C13 8.25147 12.7985 8.05 12.55 8.05H8.95V4.45Z" fill="#212121"/>
      </svg>`),e})()}}),!u&&t("div",{children:c("Drop element here")})]})})]})};export{s as default};
