import{a as e,c as t,i as n}from"./preload-helper-B45gAKPr.js";import{C as r}from"./iframe-D90hKkIJ.js";import{t as i}from"./jsx-runtime-BBQGix-2.js";import{n as a,t as o}from"./TreeMultiSelect-CrKusouJ.js";import{n as s,t as c}from"./treeStoryFixtures-Cd984L7t.js";var l=e({Basic:()=>m,MixedSelection:()=>g,ParentCompression:()=>h,__namedExportsOrder:()=>_,default:()=>p});function u({initialValue:e={},label:t=`TreeMultiSelect`,description:n}){let[r,i]=(0,d.useState)(e);return(0,f.jsxs)(`div`,{style:{display:`grid`,gap:12,maxWidth:520},children:[(0,f.jsx)(o,{label:t,description:n,nodes:c,value:r,onChange:i}),(0,f.jsxs)(`div`,{style:{fontSize:`var(--font-size-sm)`,color:`var(--content-1)`},children:[`Текущее значение: `,JSON.stringify(r)]})]})}var d,f,p,m,h,g,_,v=n((()=>{d=t(r(),1),a(),s(),f=i(),p={title:`Shared/UI/TreeMultiSelect`,component:o,parameters:{atomicCanvas:!0,layout:`padded`},args:{label:`Выбор узлов`,description:`Мультивыбор с канонизацией subtree в ближайший parent.`,nodes:c,value:{},onChange:()=>{}},argTypes:{nodes:{control:!1},value:{control:!1},onChange:{control:!1}}},m={render:()=>(0,f.jsx)(u,{initialValue:{OWNER:[`P0001`]}})},h={render:()=>(0,f.jsx)(u,{label:`Компрессия parent`,description:`Когда выбран весь subtree, наружу может уйти только родительский узел.`,initialValue:{REGION:[`R01`]}})},g={render:()=>(0,f.jsx)(u,{label:`Смешанный выбор`,description:`Пример mixed frontier по соседним уровням.`,initialValue:{BRANCH:[`B0101`],OWNER:[`P0004`]}})},m.parameters={...m.parameters,docs:{...m.parameters?.docs,source:{originalSource:`{
  render: () => <StatefulTreeMultiSelect initialValue={{
    OWNER: ["P0001"]
  }} />
}`,...m.parameters?.docs?.source}}},h.parameters={...h.parameters,docs:{...h.parameters?.docs,source:{originalSource:`{
  render: () => <StatefulTreeMultiSelect label="Компрессия parent" description="Когда выбран весь subtree, наружу может уйти только родительский узел." initialValue={{
    REGION: ["R01"]
  }} />
}`,...h.parameters?.docs?.source}}},g.parameters={...g.parameters,docs:{...g.parameters?.docs,source:{originalSource:`{
  render: () => <StatefulTreeMultiSelect label="Смешанный выбор" description="Пример mixed frontier по соседним уровням." initialValue={{
    BRANCH: ["B0101"],
    OWNER: ["P0004"]
  }} />
}`,...g.parameters?.docs?.source}}},_=[`Basic`,`ParentCompression`,`MixedSelection`]}));v();export{m as Basic,g as MixedSelection,h as ParentCompression,_ as __namedExportsOrder,p as default,v as n,l as t};