1import{r as c,j as e}from"./react-core-CRmEpXp5.js";import{C as H}from"./CalculatorCard-B37ovTns.js";import{I as d}from"./InputField-B_xhPbIg.js";import{R as j}from"./ResultDisplay-CvIGOYI1.js";import{h as F,a2 as C,a3 as w}from"./icons-CkunPDGg.js";import"./vendor-rxKBX33o.js";const I=()=>{const[t,o]=c.useState("cube"),[r,x]=c.useState(""),[m,k]=c.useState(""),[n,p]=c.useState(""),[i,b]=c.useState(""),[y,l]=c.useState(null),[g,s]=c.useState(null),[h,v]=c.useState(!1);c.useEffect(()=>{f()},[t,r,m,n,i]);const f=()=>{try{switch(t){case"cube":if(r){const a=parseFloat(r);l(Math.pow(a,3)),s(6*Math.pow(a,2))}else l(null),s(null);break;case"rectangular":r&&m&&n?(l(parseFloat(r)*parseFloat(m)*parseFloat(n)),s(2*(parseFloat(r)*parseFloat(m)+parseFloat(r)*parseFloat(n)+parseFloat(m)*parseFloat(n)))):(l(null),s(null));break;case"sphere":if(i){const a=parseFloat(i);l(4/3*Math.PI*Math.pow(a,3)),s(4*Math.PI*Math.pow(a,2))}else l(null),s(null);break;case"cylinder":if(i&&n){const a=parseFloat(i),u=parseFloat(n);l(Math.PI*Math.pow(a,2)*u),s(2*Math.PI*a*(a+u))}else l(null),s(null);break;case"cone":if(i&&n){const a=parseFloat(i),u=parseFloat(n);l(1/3*Math.PI*Math.pow(a,2)*u);const z=Math.sqrt(Math.pow(a,2)+Math.pow(u,2));s(Math.PI*a*(a+z))}else l(null),s(null);break;default:l(null),s(null)}}catch(a){l(null),s(null)}},N=()=>{switch(t){case"cube":return e.jsx(d,{id:"length",label:"Kenar UzunluÄu",value:r,onChange:a=>x(a.target.value),type:"number",step:"any",min:0,placeholder:"Küpün kenar uzunluÄunu giriniz"});
1case"rectangular":return e.jsxs(e.Fragment,{children:[e.jsx(d,{id:"length",label:"Uzunluk",value:r,onChange:a=>x(a.target.value),type:"number",step:"any",min:0,placeholder:"Uzunluk deÄerini giriniz"}),e.jsx(d,{id:"width",label:"GeniÅlik",value:m,onChange:a=>k(a.target.value),type:"number",step:"any",min:0,placeholder:"GeniÅlik deÄerini giriniz"}),e.jsx(d,{id:"height",label:"Yükseklik",value:n,onChange:a=>p(a.target.value),type:"number",step:"any",min:0,placeholder:"Yükseklik deÄerini giriniz"})]});case"sphere":return e.jsx(d,{id:"radius",label:"Yarıçap",value:i,onChange:a=>b(a.target.value),type:"number",step:"any",min:0,placeholder:"Kürenin yarıçapını giriniz"});case"cylinder":case"cone":return e.jsxs(e.Fragment,{children:[e.jsx(d,{id:"radius",label:"Yarıçap",value:i,onChange:a=>b(a.target.value),type:"number",step:"any",min:0,placeholder:"Taban yarıçapını giriniz"}),e.jsx(d,{id:"height",label:"Yükseklik",value:n,onChange:a=>p(a.target.value),type:"number",step:"any",min:0,placeholder:"Yükseklik deÄerini giriniz"})]});default:return null}};return e.jsxs(H,{title:"Hacim ve Yüzey Alanı Hesaplama",children:[e.jsxs("div",{className:"flex items-center mb-6",children:[e.jsx(F,{size:18,className:"text-blue-400 mr-2"}),e.jsx("h2",{className:"text-cyan-200",children:"3 Boyutlu Åekillerin Hacim ve Alanını Hesaplama"})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-cyan-300 mb-1 after:content-[''] after:block after:w-full after:h-px after:bg-gradient-to-r after:from-cyan-500/50 after:to-transparent after:mt-0.5",children:"Åekil Seçin"}),e.jsxs("div",{className:"bg-[#12192c]/70 border border-cyan-800/40 rounded-md p-1 grid grid-cols-2 md:grid-cols-5 gap-1",children:[e.jsx("button",{onClick:()=>{o("cube"),l(null),s(null)},className:`py-1.5 px-1 text-sm rounded ${t==="cube"?"bg-cyan-900/70 text-cyan-200":"text-cyan-400 hover:bg-cyan-900/30"} transition-all duration-200`,children:"Küp"}),e.jsx("button",{onClick:()=>{o("rectangular"),l(null),s(null)},className:`py-1.5 px-1 text-sm rounded ${t==="rectangular"?"bg-cyan-900/70 text-cyan-200":"text-cyan-400 hover:bg-cyan-900/30"} transition-all duration-200`,children:"Dikdörtgen Prizma"}),e.jsx("button",{onClick:()=>{o("sphere"),l(null),s(null)},className:`py-1.5 px-1 text-sm rounded ${t==="sphere"?"bg-cyan-900/70 text-cyan-200":"text-cyan-400 hover:bg-cyan-900/30"} transition-all duration-200`,children:"Küre"}),e.jsx("button",{onClick:()=>{o("cylinder"),l(null),s(null)},className:`py-1.5 px-1 text-sm rounded ${t==="cylinder"?"bg-cyan-900/70 text-cyan-200":"text-cyan-400 hover:bg-cyan-900/30"} transition-all duration-200`,children:"Silindir"}),e.jsx("button",{onClick:()=>{o("cone"),l(null),s(null)},className:`py-1.5 px-1 text-sm rounded ${t==="cone"?"bg-cyan-900/70 text-cyan-200":"text-cyan-400 hover:bg-cyan-900/30"} transition-all duration-200`,children:"Koni"})]})]}),N(),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[e.jsx(j,{label:"Hacim",value:y!==null?y.toFixed(4):"-",unit:"birim³"}),e.jsx(j,{label:"Yüzey Alanı",value:g!==null?g.toFixed(4):"-",unit:"birim²"})]}),e.jsxs("div",{className:"mt-4 bg-[#081020] border border-cyan-800/30 rounded-md p-3",children:[e.jsx("p",{className:"text-sm font-medium text-cyan-400 mb-1",children:"Formül"}),e.jsxs("div",{className:"text-cyan-200 font-mono text-sm",children:[t==="cube"&&"V = a³, A = 6a²",t==="rectangular"&&"V = aÃbÃc, A = 2(ab + ac + bc)",t==="sphere"&&"V = (4/3)Ïr³, A = 4Ïr²",t==="cylinder"&&"V = Ïr²h, A = 2Ïr(r + h)",t==="cone"&&"V = (1/3)Ïr²h, A = Ïr(r + â(r² + h²))"]})]}),e.jsx("p",{className:"text-xs text-cyan-600 mt-4 bg-cyan-950/20 p-2 rounded border border-cyan-900/30",children:"Hacim, bir cismin 3 boyutlu uzayda kapladıÄı yerin ölçüsüdür ve birim³ ile ifade edilir. Yüzey alanı ise cismin dıŠyüzeyinin toplam alanıdır ve birim² ile ifade edilir."}),e.jsxs("div",{className:"mt-6 border border-blue-800/30 rounded-lg overflow-hidden",children:[e.jsxs("button",{onClick:()=>v(!h),className:"w-full bg-blue-950/30 hover:bg-blue-950/50 px-4 py-3 flex items-center justify-between transition-colors",children:[e.jsx("h2",{className:"text-cyan-200 font-medium",children:"Hacim Hesaplama Hakkında Daha Fazla Bilgi"}),h?e.jsx(C,{size:20,className:"text-blue-400"}):e.jsx(w,{size:20,className:"text-blue-400"})]}),h&&e.jsxs("div",{className:"bg-[#0a1525]/80 p-4 space-y-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-blue-300 font-medium mb-2",children:"Hacim Hesaplama Ne İÅe Yarar ve Nasıl Kullanılır?"}),e.jsx("p",{className:"text-cyan-100 text-sm leading-relaxed",children:"Hacim hesaplama aracı, üç boyutlu geometrik Åekillerin hacim ve yüzey alanlarını hesaplar. Küp, küre, silindir, koni ve dikdörtgen prizma gibi Åekillerin hacimlerini bulabilirsiniz. Åekil seçtikten sonra gerekli ölçüleri girin, hacim ve yüzey alanı otomatik hesaplanır."})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-blue-300 font-medium mb-2",children:"3D Åekil Hacim Formülleri"}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{className:"text-cyan-100 text-sm",children:[e.jsx("strong",{children:"Küp:"})," V = a³"]}),e.jsxs("p",{className:"text-cyan-100 text-sm",children:[e.jsx("strong",{children:"Dikdörtgen Prizma:"})," V = a à b à c"]}),e.jsxs("p",{className:"text-cyan-100 text-sm",children:[e.jsx("strong",{children:"Küre:"})," V = (4/3) Ã Ï Ã r³"]}),e.jsxs("p",{className:"text-cyan-100 text-sm",children:[e.jsx("strong",{children:"Silindir:"})," V = Ï Ã r² à h"]}),e.jsxs("p",{className:"text-cyan-100 text-sm",children:[e.jsx("strong",{children:"Koni:"})," V = (1/3) Ã Ï Ã r² à h"]})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-blue-300 font-medium mb-2",children:"Hacim Hesaplama Kullanım Alanları"}),e.jsxs("ul",{className:"text-cyan-100 text-sm space-y-1",children:[e.jsx("li",{children:"⢠İnÅaat malzemesi hesaplamalarında"}),e.jsx("li",{children:"⢠Depola ve tank kapasitesi hesaplamalarında"}),e.jsx("li",{children:"⢠Ambalaj ve kargo hacim hesaplamalarında"}),e.jsx("li",{children:"⢠Beton ve harç miktarı hesaplamalarında"}),e.jsx("li",{children:"⢠Sıvı ve gaz kapasitesi hesaplamalarında"})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-blue-300 font-medium mb-2",children:"Sıkça Sorulan Sorular"}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-cyan-200 text-sm font-medium",children:"Hacim ve yüzey alanı arasındaki fark nedir?"}),e.jsx("p",{className:"text-cyan-100 text-sm",children:"Hacim cismin içindeki boÅluÄu, yüzey alanı ise dıŠyüzeyinin toplam alanını ölçer."})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-cyan-200 text-sm font-medium",children:"Hangi birimler kullanılır?"}),e.jsx("p",{className:"text-cyan-100 text-sm",children:"Hacim için m³, cm³, litre; yüzey alanı için m², cm² gibi birimler kullanılır."})]})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-blue-300 font-medium mb-2",children:"DiÄer Hesaplama Araçlarımız"}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsx("a",{href:"/alan-hesaplama",className:"text-blue-400 hover:text-blue-300 text-sm",children:"Alan Hesaplama"}),e.jsx("a",{href:"/metrekare",className:"text-blue-400 hover:text-blue-300 text-sm",children:"Metrekare Hesaplama"}),e.jsx("a",{href:"/uzunluk-birimi-donusturucu",className:"text-blue-400 hover:text-blue-300 text-sm",children:"Uzunluk Ãevirici"}),e.jsx("a",{href:"/yuzde-hesaplama",className:"text-blue-400 hover:text-blue-300 text-sm",children:"Yüzde Hesaplama"})]})]})]})]})]})};export{I as default}; 2//# sourceMappingURL=VolumeCalculator-DNZ2fRyZ.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.