import{a as V,g as T,i as O,cp as B,l as z,j as t,h as e,cC as u,cB as c,cD as I,bD as F,cr as D,cs as P,cE as E,cF as K,cg as k,aV as A}from"./main-343.js";import{s as L}from"./bf-810-248.js";import{b as x}from"./bf-603-251.js";import{S as M}from"./bf-914-249.js";import"./bf-453-86.js";import"./bf-649-79.js";import"./bf-190-88.js";import"./bf-90-70.js";import"./bf-594-113.js";import"./bf-870-250.js";function ss({objectPaths:h,id:l}){const{css:r}=V(),{fieldKey:b,element:j}=T(),[w,S]=O(k),[g,C]=O(A),{object:d,paths:y}=h,H=B(d,{themeColors:w,styles:g}),$=z(H,y.shadow),n=R($),N=(s,a,i)=>s==="color"?a||"hsla(0, 0%, 0%, 100)":s==="inset"?a||"":`${a||"0"}${i===void 0?"px":i}`,o=(s,{value:a,unit:i})=>{const p=Object.entries(n).map(([f,v])=>f===s?N(s,a,i):N(f,v,"")).join(" ");I(d,y.shadow,p,{setThemeColors:S,setStyles:C}),F(D(j,b,y.shadow,p,{[d]:P(d)}))},m=(s,a,i,p)=>{if(i){const f=c(p),v=E(a,i,f);o(s,{value:v,unit:a})}};return t.jsxs("div",{children:[t.jsxs("div",{className:r(e.flxcb,e.mb2,e.pt1),children:[t.jsx("span",{className:r(e.fs12,e.fw500),children:"X"}),t.jsx(x,{width:"128px",value:Number(u(n.xOffset)||0),unit:c(n.xOffset)||"px",inputHandler:s=>o("xOffset",s),sizeHandler:({unitKey:s,unitValue:a})=>m("xOffset",s,a,n.xOffset),options:["px","em","rem"],min:"-10",max:"20",dataTestId:`${l}-x-offset`})]}),t.jsxs("div",{className:r(e.flxcb,e.mb2),children:[t.jsx("span",{className:r(e.fs12,e.fw500),children:"Y"}),t.jsx(x,{width:"128px",value:Number(u(n.yOffset)||0),unit:c(n.yOffset)||"px",inputHandler:s=>o("yOffset",s),sizeHandler:({unitKey:s,unitValue:a})=>m("yOffset",s,a,n.yOffset),options:["px","em","rem"],min:"-10",max:"20",dataTestId:`${l}-y-offset`})]}),t.jsxs("div",{className:r(e.flxcb,e.mb2),children:[t.jsx("span",{className:r(e.fs12,e.fw500),children:"Blur"}),t.jsx(x,{width:"128px",value:Number(u(n.blur)||0),unit:c(n.blur)||"px",inputHandler:s=>o("blur",s),sizeHandler:({unitKey:s,unitValue:a})=>m("blur",s,a,n.blur),options:["px","em","rem"],min:"0",max:"10",dataTestId:`${l}-blur`})]}),t.jsxs("div",{className:r(e.flxcb,e.mb2),children:[t.jsx("span",{className:r(e.fs12,e.fw500),children:"Spread"}),t.jsx(x,{width:"128px",value:Number(u(n.spread)||0),unit:c(n.spread)||"px",inputHandler:s=>o("spread",s),sizeHandler:({unitKey:s,unitValue:a})=>m("spread",s,a,n.spread),options:["px","em","rem"],min:"-5",max:"20",dataTestId:`${l}-spread`})]}),t.jsxs("div",{className:r(e.flxcb,e.mb2),children:[t.jsx("span",{className:r(e.fs12,e.fw500),children:"Color"}),t.jsx(M,{action:{onChange:s=>o("color",{value:s})},value:n.color})]}),t.jsxs("div",{className:r(e.flxcb,e.mb2),children:[t.jsx("span",{className:r(e.fs12,e.fw500),children:"Inset"}),t.jsxs("select",{className:r(L.select),value:n.inset||"",onChange:s=>o("inset",{value:s.target.value}),"data-testid":`${l}-inset`,children:[t.jsx("option",{value:"",children:"outset"}),t.jsx("option",{value:"inset",children:"inset"})]})]})]})}const R=h=>{const[l,r,b,j,w,S]=K(h);return{xOffset:l,yOffset:r,blur:b,spread:j,color:w,inset:S}};export{ss as default};
