var k=Object.defineProperty;var n=Object.getOwnPropertySymbols;var l=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;var f=(r,o,t)=>o in r?k(r,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[o]=t,d=(r,o)=>{for(var t in o||(o={}))l.call(o,t)&&f(r,t,o[t]);if(n)for(var t of n(o))u.call(o,t)&&f(r,t,o[t]);return r};var h=(r,o)=>{var t={};for(var i in r)l.call(r,i)&&o.indexOf(i)<0&&(t[i]=r[i]);if(r!=null&&n)for(var i of n(r))o.indexOf(i)<0&&u.call(r,i)&&(t[i]=r[i]);return t};import{jsx as s}from"react/jsx-runtime";import{c as w,e as L}from"./ui-components-B24mpb8o.js";import y from"react";import _ from"./layers-tree-item-BgGqwNlV.js";import"next-themes";import"sonner";import"@radix-ui/react-label";import"class-variance-authority";import"@radix-ui/react-checkbox";import"lucide-react";import"@radix-ui/react-avatar";import"@radix-ui/react-dropdown-menu";import"@radix-ui/react-scroll-area";import"@radix-ui/react-popover";import"@radix-ui/react-radio-group";import"@radix-ui/react-dialog";import"@radix-ui/react-slot";import"clsx";import"@radix-ui/react-separator";import"@radix-ui/react-tooltip";import"@radix-ui/react-tabs";import"@radix-ui/react-accordion";import"@radix-ui/react-progress";import"@radix-ui/react-select";import"cmdk";import"@radix-ui/react-switch";import"react-day-picker";import"@radix-ui/react-slider";import"embla-carousel-react";import"@radix-ui/react-toggle-group";import"vaul";import"tailwind-merge";import"./use-editor-D8T8wKX0.js";import"./editor-provider-CwMLJaUa.js";import"uuid";import"./layers-tree-leaf-Cnyj1odA.js";const v=b=>{var c=b,{data:r,onSelectChange:o,expandAll:t,className:i}=c,I=h(c,["data","onSelectChange","expandAll","className"]);const N=y.useCallback(e=>{o&&o(e)},[o]),T=y.useMemo(()=>{const e=[];function a(m){if(m instanceof Array)for(let p=0;p<m.length;p++){if(e.push(m[p].id),a(m[p])&&!t)return!0;t||e.pop()}else if(t){if(Array.isArray(m.content))return a(m.content)}else return!0}return a(r),e},[r,t]);return s("div",{className:w("overflow-hidden",i),children:s(L,{children:s("div",{className:"relative",children:s(_,d({data:r,handleSelectChange:N,expandedItemIds:T},I))})})})};v.displayName=v.name;export{v as default};
