import{a as T,g as V,i as O,cs as B,l as z,j as t,h as e,cC as u,cB as c,cD as I,bG as F,cu as P,cv as D,cE as E,cF as K,cl as X,aX as k}from"./main-634.js";import{s as A}from"./bf-486-243.js";import{a as x}from"./bf-497-246.js";import{S as G}from"./bf-723-244.js";import"./bf-25-81.js";import"./bf-400-72.js";import"./bf-438-114.js";import"./bf-299-245.js";import"./bf-534-247.js";function _({objectPaths:h,id:l}){const{css:r}=T(),{fieldKey:b,element:j}=V(),[w,S]=O(X),[g,C]=O(k),{object:d,paths:v}=h,H=B(d,{themeColors:w,styles:g}),$=z(H,v.shadow),n=L($),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 f=Object.entries(n).map(([p,y])=>p===s?N(s,a,i):N(p,y,"")).join(" ");I(d,v.shadow,f,{setThemeColors:S,setStyles:C}),F(P(j,b,v.shadow,f,{[d]:D(d)}))},m=(s,a,i,f)=>{if(i){const p=c(f),y=E(a,i,p);o(s,{value:y,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(G,{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(A.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 L=h=>{const[l,r,b,j,w,S]=K(h);return{xOffset:l,yOffset:r,blur:b,spread:j,color:w,inset:S}};export{_ as default};
