import{a as T,w as V,h as O,b9 as z,ba as B,j as t,x as e,bs as u,br as c,bt as I,aU as F,bd as P,be as K,bu as U,bv as k,a$ as q,aq as A}from"./main-40.js";import{s as D}from"./bf-755-109.js";import{b as x}from"./bf-142-111.js";import{S as E}from"./bf-175-110.js";import"./bf-376-112.js";import"./bf-141-80.js";import"./bf-547-83.js";import"./bf-683-113.js";import"./bf-586-70.js";function _({objectPaths:b,id:l}){const{css:r}=T(),{fieldKey:h,element:j}=V(),[w,S]=O(q),[H,g]=O(A),{object:d,paths:v}=b,C=z(d,{themeColors:w,styles:H}),$=B(C,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:g}),F(P(j,h,v.shadow,f,{[d]:K(d)}))},m=(s,a,i,f)=>{if(i){const p=c(f),y=U(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(E,{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(D.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=b=>{const[l,r,h,j,w,S]=k(b);return{xOffset:l,yOffset:r,blur:h,spread:j,color:w,inset:S}};export{_ as default};
